Break API endpoints out into a separate file.
Review Request #7486 — Created July 3, 2015 and discarded — Latest diff uploaded
In preparation for a more extensive API, this moves the API endpoints into a
separate file. This also adds the 'body-parser' middleware that will make it
easier to accept POST data.
Clicked around and verified that everything still worked as expected.