Search fixes

@hollocherdale and I tracked this down at the 7/26 code sprint: The references to :Sunspot were finding the global one defined in the Sunspot gem; because that constant already existed, Rails' magic constant loading didn't get invoked to find ours. Fix by requiring ours explicitly. (Requiring sql too, just for symmetry and future protection against a global Sql constant.)

Also: remove a few hard-coded port numbers that duplicate what's in our solr/sunspot configuration, and when testing, determine whether we have Sunspot/Solr by communicating with the test instance port, not just by looking for a running Solr process by process ID. This means that if you want to run the Sunspot/Solr tests, you'll need to start a test-specific instance, like:
```
RAILS_ENV=test bundle exec rake sunspot:solr:start
```
This'll keep your test indexes separate from your development indexes.