Simplify SearchController#results

Give names to the various things being searched for and move them out
into their own methods. Also add scopes to give names to things being
queried out of the models.