Fs 3351

Adds a sortBy call to db.getAll and db.query
calls sortBy in getRetrospectives and getTickets
writes '_timestamp' field to posted documents