Allow author to cap enrollments in course

add a test case for enrollment caps

pep8 fix
Merge pull request #1967 from edx/feature/cdodge/cap-num-enrollments

Add ability to cap number of enrollments in a course