Allow the python client to be run without app engine

This is quite a hacky mess right now. Further changes will clean up the
app engine dependencies and abstract out some of the complications.