Improve search query structure
Improve search query structure

* Don't add type filter for context checks when user is Admin
* Consolidate joins for polymorphic types and generate `type_column`
  from `<mapper>.polymorphic_map` (same as in
  `services.common._get_type_select_column`)
* Find objects related via `UserRole.context_id` via subquery (in UNION)
  rather than as JOIN on MysqlRecordProperty.context_id
* Avoid loading full `MysqlRecordProperty` entries, namely `context`,
  which was causing massive query result size
* Handle result ordering slightly more efficiently

selahssea/ggrc-core,hasanalom/ggrc-core,j0gurt/ggrc-core,hasanalom/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,vladan-m/ggrc-core,josthkko/ggrc-core,plamut/ggrc-core,hasanalom/ggrc-core,hyperNURb/ggrc-core,uskudnik/ggrc-core,andrei-karalionak/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,jmakov/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,kr41/ggrc-core,prasannav7/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,uskudnik/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,vladan-m/ggrc-core,plamut/ggrc-core,hasanalom/ggrc-core,uskudnik/ggrc-core,AleksNeStu/ggrc-core,vladan-m/ggrc-core,AleksNeStu/ggrc-core,vladan-m/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,uskudnik/ggrc-core,uskudnik/ggrc-core,edofic/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,jmakov/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,prasannav7/ggrc-core,hasanalom/ggrc-core,prasannav7/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,hyperNURb/ggrc-core,hyperNURb/ggrc-core,vladan-m/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,edofic/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core