Refactored backend code to work with requests and google app engine

Summary: Most of the program structure has been preserved. Mostly cases for handling different that GET requests have been added. Using requests makes code a lot less awkward.

Reviewers: csilvers, alpert, joel

Reviewed By: alpert

CC: ben

Maniphest Tasks: T1210

Differential Revision: http://phabricator.khanacademy.org/D3006