Handle postgres idle error (RDS failover)

- On postgres idle error try and reconnect with delay and number of
attempts specified in configuration
- Updated sample config and readme