Clean up pkg/apiserver

In order to make changes in #656 easier, I did a refactor
for style and clarity in apiserver.  Methods were moved
into various files, some methods were removed from APIServer,
and tests were split out as well.  No functional changes
intended here except notFound() only printing the requested
URI, not the entire request.