Add heartbeat to check if backend is alive.

Send a 'ping' request every 2 secs to ensure that the backend is
running.
Use polling instead of recv on the backend_proxy. This was already
implemented for the signaler.
I'm thinking that maybe we should check for backend `pid`, because restarting bitmask if the backend is still running would break. Or are you planning that for the next pullreq?