Increased speed of manage class (fixes issue 68).

Changes taken from suggestions in the issue #68. groupedClassrooms call is replaced by faster call that only does what is needed.
Updated to use database to handle getting what we want.
Merge pull request #570 from learning-unlimited/issue68

Increased speed of manage class (fixes issue 68).