log unexpected errors in wait_for_server
move some utility functions to ORM classes

simplify handler methods
raise TimeoutError in wait_for_server
restart the proxy if it goes down

and populate its table from the database
make HTTP requests to the proxy async
always use transient IOLoop for run_sync
Merge pull request #38 from minrk/restart-proxy

restart the proxy if it goes down
don't pass notebook app args to kernel

2.x compatibility fix
Merge pull request #41 from minrk/kernel_argv_2.x

don't pass notebook app args to kernel
pass config to spawner
setgid and chdir before setuid