Do not expose encoder state through public hooks (as_json)

See [1] for why this is not a good idea.

As part of this refactor, circular reference protection in as_json has
been removed and the corresponding error class has been deprecated.
As per discussion with @jeremy, circular reference error is considered
programmer errors and protecting against it is out of scope for
Encoder#as_json.

This is again based on the excellent work by @sergiocampama in #11728.

[1]: https://github.com/intridea/multi_json/pull/138#issuecomment-24468223
Eliminate JSON.{parse,load,generate,dump} / def to_json

JSON.{dump,generate} offered by the JSON gem is not compatiable with
Rails at the moment and can cause a lot of subtle bugs when passed
certain data structures. This changed all direct usage of the JSON gem
in internal Rails code to always go through AS::JSON.{decode,encode}.

We also shouldn't be implementing `to_json` most of the time, and
these occurances are replaced with an equivilent `as_json`
implementation to avoid problems down the road.

See [1] for all the juicy details.

[1]: https://github.com/intridea/multi_json/pull/138#issuecomment-24468223