[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.