Adds model mixin for {to,from}_dict functionality

Implements ModelDictMixin, which is an alternative to DictBase that does
not force a module to have an "extra" field. It also gets away from the
idea that we need to keep a list of attibutes, named `attributes`, on
each model definition.

Change-Id: Id2c208ee9be4cc17b1b6444c5e0558952571163b
Fixes-bug: #1265071
Merge "Adds model mixin for {to,from}_dict functionality"