Don't swallow exceptions in transctional statements

The MySQL connection adapater swallows all StandardError exceptions,
which includes Mysql::Error and Mysql2::Error. The comment in the
exception clause claims errors thrown here indicate that transactions
aren't supported by the server but that isn't necessarily true. It's
possible the MySQL server has gone away and swallowing a failed commit
may let the application return a successful response when the data has
not been saved. Also, replication libraries like Galera require that the
application handle exceptions thrown at BEGIN/COMMIT.

I'm unable to determine what version of MySQL threw an exception for
transactional statements. I tried as far back as 3.23.49 with InnoDB
disabled but BEGIN & COMMIT statements do not throw an error. If there's
a real case for this logic to continue, we could instead push this
behavior into a configuration setting.

The exception swallowing has been there since the beginning:
db045dbbf60b53dbe013ef25554fd013baf88134
Also dup `column_types` in AR::Result `initialize_copy`
Explicitly exit with status "1" for create and drop failures

* A non-zero exit status allows subsequent shell commands to be chained
  together such as: `rake db:reset test:prepare && rspec && cap deploy`
  (if you're feeling brave :)
* Any exceptions raised during the `create` and `drop` tasks are caught
  in order to print a "pretty" message to the user. Unfortunately doing
  so prevents rake from aborting with a non-zero exit status to the shell.
* Therefore we re-raise the exceptions after the "pretty" message and
  re-catch them in the task.
* From the task we explicitly exit with a non-zero status. This method
  was chosen (rather than just letting rake fail from the exception) so
  that the backtrace is suppressed and the output to stderr is
  unchanged.
* Update activerecord CHANGELOG
Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method.
class methods moved to already defined class<<self block
Merge pull request #12890 from akshay-vishnoi/refactor

class methods moved to already defined class<<self block
Merge pull request #12891 from javan/to-param

Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method
Used Yield instead of block.call
Merge pull request #12889 from kuldeepaggarwal/speed_ups

Used Yield instead of block.call
avoiding next statements
Merge pull request #12892 from akshay-vishnoi/refactor

avoiding next statements
Addendum to #12891
* Fix incorrectly named tests
* Restore Object#to_param behavior
* Ensure param is derived from a squished and truncated string
Merge pull request #12819 from vipulnsward/also_dup_column_types

Also dup `column_types` in AR::Result `initialize_copy`
Merge pull request #12893 from javan/to-param-addendum

Addendum to #12891
Fix that eager loading of polymorphic associations did not work with association empty?/any? predicates any more (there is still a problem when select is applied to a relation, or if you try association#exists? -- but its easier to work around)
Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep".

This reverts commit d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.
Improved compatibility with the stdlib JSON gem.

Previously, calling `::JSON.{generate,dump}` sometimes causes
unexpected failures such as intridea/multi_json#86.

`::JSON.{generate,dump}` now bypasses the ActiveSupport JSON encoder
completely and yields the same result with or without ActiveSupport.
This means that it will **not** call `as_json` and will ignore any
options that the JSON gem does not natively understand. To invoke
ActiveSupport's JSON encoder instead, use `obj.to_json(options)` or
`ActiveSupport::JSON.encode(obj, options)`.
Merge pull request #12862 from chancancode/json_gem_compat

JSON gem compatibility
Set branch for arel in Gemfile so that we can use bundle local config [ci skip]
Fix AR Changelog examples and improve syntax highlight [ci skip]