introduces MembershipSorter

sortMembership() is removed from User and Group entities.
Memberships are sorted in the api endpoint.
upgraded to jdk8
using the new streaming api for mapping collections