Fix json stringfy on model saving

This was documented in the group model tests and worked around in the
badge controller tests, and generally caused the behavior of models to
be highly unexpected.

This fix works by never mutating the model when preparing it for
the database.

Note that this fix also assumes that #581 will be accepted, and consequently includes its commits.