add :root option to ActiveModel JSON serialization

This is a small, straightforward patch that I'd love to see merged:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4358-patch-add-root-option-to-activemodel-json-serialization

It's all pretty self-explanatory, it basically just ports a useful
option from to_xml to to_json, making their interfaces more compatible
with each other. Feedback would be greatly appreciated.

Thanks,
James