Tequila Rails Patch. r:awesome

Squashed commit of the following changes, which were either
cherry-picked from Rails 3.2.x or coded by Ajit:

https://github.com/tracksimple/rails/commit/354c36a
    when the transactional fixtures keeps a database transaction
    alive without using the transaction method, don't retain
    references to all the records saved in the fixtures transaction
    once their subtransaction completes

https://github.com/tracksimple/rails/commit/4515324
    expose :remember_record_state => false option on transaction(),
    so applications that don't need state rollback (or
    after_commit/rollback hooks) can garbage collect the records
    during long transactions

https://github.com/tracksimple/rails/commit/d425dcf
    turn remember_record_state off for nested transactions if
    parent has it off. r: zook

https://github.com/tracksimple/rails/commit/ded32e7
    Add ActiveRecord::Relation#uniq for toggling DISTINCT in the
    SQL query

https://github.com/tracksimple/rails/commit/b1eff91
    Use uniq instead of manually putting a DISTINCT in the query

https://github.com/tracksimple/rails/commit/aa63115
    Upping sprockets version. nr