Add models.SubfieldBase metaclass

For postgress < 90200 the `db_type` will be `text`. In this case it is
necessary to use the `models.SubfieldBase` metaclass so that `to_python` is
called when the model is initialised from the database.

This is described fully in [the documentation](https://docs.djangoproject.com/en/dev/howto/custom-model-fields/#the-subfieldbase-metaclass).