Support using the model's specified connection rather than application default

In models you may wish to do something like
```
class Userstats < ActiveRecord::Base
  establish_connection "analysis_#{Rails.env}"
```

postgresql_cursor should respect the connection specified in the model. This patch implements defaulting to the model's connection.