Added more tests for groups in JPA, and tweaked things to allow for
sorting and selecting of grouped data.