Separated handling of REST calls from server code. This may allow
us to let the code gen provide a rest_handlers.cpp.