Implemented proper reconnecting in the PostGres class using the BackoffTimer

It will of course only try to reconnect if needed, so only if we're set to stay
connected or if we have jobs queued up.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>