Feature/socket reconnect

Solves https://github.com/bitpay/insight/issues/274