enrollment tests and cleanup

Many, many, many tests. Pep8 cleanup, some additional validation. Includes separation of data.py from api.py, to allow testing the API independently of the data layer. 

@wedaly @dianakhuang @rlucioni 
Is this an anonymized student ID?  I'm worried that exposing the raw student ID might create security vulnerabilities [like these](http://webpolicy.org/2014/09/04/a-funny-thing-happened-on-the-way-to-coursera/).