CMS-3930 Apply default sorting for workspace queries

Added default sorting by timestamp.
CMS-3929 Fix sorting of GetByParent

Added support for sort, aka refactor to query.