Feature/advanced search refactor

This is a bit of a refactor of https://github.com/reciprocity/ggrc-core/pull/1632, but I'm not sure if creating new models just for the search modal is a good idea - hence the separate PR.