Move API specific code to api subdirectory

The API will be a thread within the server, not the server itself.
Because of this, it doesn't make sense for the API to live at the
server path.

Change-Id: Icf0d5a9e511bbb11bd2f4e2ef27c4c50511151b7