message: Set errno correctly in riemann_message_from_buffer()

When riemann_message_from_buffer() is on the error path, set errno to
EINVAL. Also add a test case for this behaviour.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Auto-detect a running riemann

Instead of relying on an environment variable to be set, automatically
detect if riemann is running (by trying to connect to it), and enable
network tests if it is.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>