Abstract model type registry as a metaclass

Subclasses of Model are now automatically registered with the metaclass
registry, so that it becomes easier to make custom models, since no manual
registration is required.