write_riemann plugin: Implement communication over TCP.
postgresql plugin: Don't do any SQL query when checking the connection.

First of all, this is not needed -- PQstatus() will correctly determine a
failed connection without that. Secondly, the "SELECT 42" that was used before
does not work, e.g. when querying PgBouncer (thanks to renchap for reporting
this on IRC!).
postgresql plugin: If a query fails, try to reconnect immediately.

Else, we would unnecessarily skip one iteration even when being able to
reconnect right away.