integrate the active_model-better_errors gem

refs CNVS-6040

This gem will help us output json error responses in the API using error
codes, since by itself ActiveRecord::Errors just deals in human-readable
i18n'd strings, and doesn't store detailed machine-readable information
on the error.

BetterErrors is mostly compatible, there's a few differences that mean I
had to change some unrelated code:

* errors[field_name] always returns an array, even if there's only one
  error on the field. This is an improvement IMO.
* errors is indexed by symbol, not by string
* iterating over the errors object now yields
  |attr, error_object| rather than |attr, string_message|

This includes a backport of the gem to rails 2.3.
On rails 3, we just use the vanilla gem.

The error codes aren't yet documented in the API docs, support for doing
that will come in a subsequent commit.

test plan: specs, plus you can hit the one api endpoint i've converted
so far -- account authorization configs. try to create an invalid
config, such as adding both cas and ldap configs to the same account,
and verify the error response formatting

Change-Id: Iaadd843ca9ff3f52c64e0256d82b64595c5559fb
Reviewed-on: https://gerrit.instructure.com/26178
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>