Deprecate #connection in favour of accessing it via the class

This allows end-users to have a `connection` method on their models
without clashing with ActiveRecord internals.
Merge pull request #9371 from benmoss/access-connection-via-class

Access an instance's connection via its class, rather than via #connection