Implement REST API for search server.

Fix some whitespace inconsistencies (sorry, I'm in the midst of switching editors; my old editor made certain parts of the PEAR coding standard inconvenient to follow, so I'm updating my sources as I go)