Centralize serialization/deserialization of resource models.

Previously, all JavaScript resource models were responsible for
implementing toJSON() and parseResourceData() functions. In many cases,
there were inconsistencies in how they handled certain
serialization/deserialization operations.

Along with this, we had no way of mapping attribute names to JSON
fields. This meant that, in some cases, calling code had to know about
the JSON fields in order to perform certain operations (like
fine-grained saving of fields).

Now, resources list the attributes to serialize and deserialize, and can
provide a map between attribute names and JSON field names. They can
also list custom serializers/deserializers for different fields. All
common serializers are provided in a new RB.JSONSerializers object.

This doesn't fully remove the need for toJSON or parseResourceData
functions, but most are gone. Most others can be removed down the road
if we centralize text type processing into a mixin.

An upcoming change will allow fine-grained saving of fields based on
attribute names, allowing us to make faster API calls with less impact
on the server.

Reviewed at https://reviews.reviewboard.org/r/6587/
Merge branch 'release-2.0.x'