Extending the Document Control functionality

Still a work in progress.

Extending the document control api to do all the things you'd expect it to do. Things to be done:
* pagination support
* better adherence to jsonapi spec (links, meta)
* file versioning (probably not in this sprint)
Note to self: convert raw SQL to ORM use