restart the proxy if it goes down

and populate its table from the database

- move some utility functions to ORM classes
- make some HTTP requests async

closes #26