Expire subclassed models correctly

We have cached models that are subclassed.
If an update happens on the subclassed record,
we need to expire the parent's cache.
Handle version == 0

When updating an ActiveRecord object that isn't currently in cache,
the current version was set to 0. We want to renew in this case.
Correctly handle parameterized find_by_sql selects

Parameterzied find_by_sql selects were erroring e.g:
User.find_by_sql(["select * from users where login = ?",'josh'])
Stop using prepared statements

Certain queries were being sent as prepared statements, even when
disabled in the rails settings.
pgBouncer and other external connection pool managers don't deal well
with prepared statements.
I'm unsure what other side effects this change may have.

Also see:

https://github.com/orslumen/record-cache/issues/21
https://github.com/rails/rails/pull/5872
Adds an optional TTL to limit cache time

We have external services that update cached models without going
through rails (not a recommended design), and found that the best
way to avoid serving cached results from record-cache was to add a
TTL to these models, so the data would expire after a set time.
Disables writes to the cache during a transaction

In application code, ActiveRecord can create a record during a transaction.
If we allow record-cache to write this record into the cache, and the
transaction is rolledback, future select queries can return a record from cache
that doesn't exist in the database.
Merge branch 'add_ttl_option'
Merge branch 'allow_subclassing'
Merge branch 'dont_write_during_transactions'

Conflicts:
	lib/record_cache/strategy/unique_index_cache.rb
Merge branch 'fix_parameterized_find_by_sql'
Merge branch 'fix_version_bug'