Better accuracy of dropped frames for HTTP drains

This patch moves the counting of lost messages outside of the drain
buffer and brings it into the HTTP drain itself, which will treat
them as a new message part of its queue, to be produced once the queue
is empty and no errors happened while sending other messages.

This frame will contain the accumulated errors for all previous frames
(lost while parsing, and lost while trying to send and failing after too
many retries or malformed requests).

The patch also removes bits of dead code here and there, and adds tests,
which add a dependency for meck. The dependency will never be part of
the standard compile path, and so a new test config has been created: it
mirrors the regular config, but allows specific dependencies not to be
included in production.

The new way to build tests has been documented.