Fix import indexing issues

* In some cases, objects can exist in both `session.new` and
  `session.dirty`, so ensure we don't try to create duplicate index
  records.
Fixed tooltips sometimes disappearing in modals
Added alphabetical sorting to People/Roles/Authorizations widgets on the admin dashboard
Extract context-query-filter code into `ggrc.rbac`

* Make consistent application of context filters easier
Use `session._permissions_loaded` to avoid duplicate query

* Previously, UserRole query was being executed many times per request
`Cache` already stores sets, so no need to convert them
Adding allow-same-origin for iframe previews in case of logins
add button for import template download
Merge branch 'develop' into feature/templatedownload
Imports will show cell error for missing Titles
Make cache manage dirty so that clients benefit
Use common function to update indexes

Needed as multiple objects could be modified in a transaction, e.g.,
cascade deletes.
Merge pull request #389 from reciprocity/feature/wysiwyg_tooltip

Fixed tooltips disappearing in modals
Merge pull request #397 from reciprocity/feature/iframe_tweak

Added allow-same-origin to iframe sandbox
Merge remote-tracking branch 'origin/develop' into feature/import_work_oct1

Conflicts:
	src/ggrc/converters/base_row.py
Merge pull request #398 from reciprocity/feature/import_work_oct1

Imports require title and will notify user when missing
Merge pull request #391 from reciprocity/feature/admin_people_sort

Added alphabetical sorting to People/Roles/Authorizations widgets in the admin dashboard
progress on approach of modifying metadata method
revert back from this approach
revert back further for alternate approach