Updated to use Doctrine ORM

As well as migrating to a new persistence layer, a couple of new features have been added:
- `Publishable` behaviour
- `Versionable` enhancements