[1685] Migrate to Ransack from meta_search

This PR is for #1685, and is a continuation of the work @pavelbrylov did in #1811.

So far I've rebased his work on master, fixing merge conflicts. More to come! :cat: