Implementing the search API to use a Google Search Appliance backend.

This also improves the way exceptions are used to invoke HTTP error responses.
I added some basic logging, since the number of error conditions has grown quite a bit.