Fix postgres_ext for rails 4.1

Currently CTEProxy will blow on rails 4.1(.8). This is due to the method 'relation_delegate_class' beeing called upon it.

```
undefined method `relation_delegate_class' for #<CTEProxy:0x007f612e542310>

activerecord (4.1.8) lib/active_record/relation/delegation.rb:112:in `relation_class_for'
activerecord (4.1.8) lib/active_record/relation/delegation.rb:106:in `create'
activerecord (4.1.8) lib/active_record/relation/spawn_methods.rb:67:in `relation_with'
activerecord (4.1.8) lib/active_record/relation/spawn_methods.rb:53:in `except'
activerecord (4.1.8) lib/active_record/relation/calculations.rb:317:in `execute_grouped_calculation'
activerecord (4.1.8) lib/active_record/relation/calculations.rb:225:in `perform_calculation'
activerecord (4.1.8) lib/active_record/relation/calculations.rb:119:in `calculate'
activerecord (4.1.8) lib/active_record/relation/calculations.rb:34:in `count'
```

This PR solves issue #122