Full 3.x compatibility

- [x] Backport all 3.x data saving tests
- [x] Implement EntityModel::alias()
- [x] Implement EntityModel::connection()
- [ ] Implement EntityModel::association()
- [x] Implement EntityModel::associations()
- [ ] Implement Entity::validate()
- [x] Add a TableRegistry class
- [ ] Move serialization of entities into a Marshaller class, similar to how 3.x has
- [ ] Test using namespaces