Add more flexibility to the ListStudents API

Add options to return user IDs instead of usernames, and to group
students by course instead of returning a single de-duplicated
list.

Change-Id: I59bd7b52f7820a6b637ef10f1eb679e3b8f6551f
Merge "Add more flexibility to the ListStudents API"