..F....... [DEV-538] better code:

 - improved validation of sort and sortorder input parameters
 - removed functions order_by(), validate_sort_and_sortorder(), getPageSortField() and getPageSortOrder(); rewritten code without using these functions