#AGENT-14 Fix incorrect metrics in postgres plugin (#143)
#AGENT-14 Fix incorrect metrics in postgres plugin (#143)

The postgres monitor was keeping a connection and cursor open per instance of
the monitor.  By default statements executed by a connection are executed
inside of a transaction.

To ensure consistency, all database statistics remain constant inside a single
transaction and so when we were querying the statistics because it was still
in the same transaction, the same values were being returned.

I've fixed this by opening and closing the db connection each gather_sample.

scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,imron/scalyr-agent-2