Tequila Rails Patch. r:awesome r:amlan

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/293c520
    Methods like status and location are interfering with redirect_to
    [Closes #2511]

    cherry-picked: 75dd33a0aed96d9f03b79c82f7e5bc5ccf462e8e

https://github.com/tracksimple/rails/commit/520e46e
    javascript_include_tag should add '.js' to sources that contain '.'

    cherry-picked: ba708126d85a020f8984db1a12261bcdba47d70f

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