discover refactoring

This is just so we can track progress/what's left to do on this branch.

- [ ] Make sure all search plugins have been updated to use entry
- [ ] Get rid of 'type' option and just return all results for other filters to deal with?
- [ ] If above is done, can we remove the comparators and just do the matching in urlrewrite search?

There's probably more stuff too.

Oh, and I added some tests for discover, it should be fairly easy to add new ones to test more functionality as we decide on it now.