Update exception handling and add connection timeout of Redshift

Hi.
This plug-in is very useful!

When server can not connect to the Redshift, td-agent also time oute.
Therefore, I added setting of the connection time-out to `PG.connect`.

and `conn.close` , also will not work correctly when an exception occurs, 
changed exceptional processing. I revised there.

Please check this.
If there is no problem, the version up, please upload to RubyGems.

つたない英語で申し訳ありません。Redshiftへの接続ができない場合
timeoutが発生し、td-agentがforward先からロストします。
その問題を解決するためのプラグインです。ご確認をお願いします。