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
Clean up some schema artifacts

* Several columns in core models were `NOT NULL` in the database, but
  nullable in the model definitions; update the database to reflect
* Role.scope was not nullable but should be
* Object{File/Folder/Event} had unused `permissions_json` columns
Aggregate `_extra_table_args` to build `__table_args__`

* Basically, creates an inheritable `__table_args__`, to enable mixin
  classes to define indexes and constraints
Add uniform `context_id` and `contact_id` indexes
Change most uses of `__table_args__` to `_extra_table_args`
Fix `MysqlRecordProperty.__table_args__`

* Added an explicit (but incorrect) index to prevent alembic from trying
  to generate a new index with each migration
Add indexes for "MyWork" fulltext search

* Add index on `user_roles.person_id`
* Add index on `controls.principal_assessor_id` and
  `controls.secondary_assessor_id`
Merge pull request #1297 from reciprocity/feature/search-query-refactor

Search query refactor, schema cleanup, and indexes