rpc: pass errors from async_accept and avoid leaks

Two commits to (hopefully) improve RPC behaviour:

- Pass errors from async_accept
- Make sure connection object is always cleaned up