new API

rewrite API using [django rest framework](http://www.django-rest-framework.org/) for use in new attendance views and also trainee autocomplete.