blkback: add per-connection statistics tracking

We track a number of performance-related counters per connection
and print snapshots every 10s. If nothing has happened in the last
10s then we dump some additional ring diagnostics (useful, to
debug deadlocks)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
blkback: handle the requests synchronously; use the new loss-less activations interface

The ring is designed to support two parties trading data without
explicit locks. The ring access functions are not safe for access
from multiple threads on each side. In the blkback we switch to
handling the ring (manipulating shared counters, sending notifications)
in a single lwt thread.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
blkback: if the ring slot cannot be parsed, print diagnostics

If there is a race in the frontend e.g. one thread pushes before
another thread has written a slot; or a problem with a memory
barrier then the backend can see an unparseable request. To help
diagnose this we wait a few seconds and then attempt to parse
the request again. If it can be parsed now, this suggests some
kind of race. If it still can't be parsed then this is mere
request corruption.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>