Use ConnectionBad instead of PG::Error for connection related failures.

Replace rb_bug() for PQsocket() failure with rb_raise().