Implements rudimentary sorting for index tables

This forces the collections to be stored as arrays for the template
rendering rather than the objects that were present in order to function
with Angular's orderBy filter
Fix link to contact view from contact index