[PD-701] Added per page options and sorting to contact records

Also did a bit of refactoring and made sort by activity and date behave properly.
Can you point me to where this changed? Why aren't we checking for "all" or "undefined" anymore?