catch any exception waiting with requests

requests-2.4 changed the exception class for failed connections.
Merge pull request #338 from minrk/requests-2.4

catch any exception waiting with requests
use write_error instead of get_error_html

due to changes in tornado 4 for custom error html
The beginnings of indexed notebooks.
2-space -> 4-space indents
Elasticsearch property, add requirement
os.environ.get
Fix name switch
Fix encoding, fix spacing.
Add indexing debug statement
Render and cache before indexing content.
Keep a key for public vs. private notebooks
Extract notebook from json reading into finish nb
Now to index the notebook + whether it is public.
Log indexing, clean up comments
Fix error handling around reads_json.
Add hokey test
Send actual error message out about notebook
Not really a test, test
Call search indexing.