AI training API and models

Initial implementation of the AI training API calls, database models, and tasks. 

@stephensanchez