Guarantee order of commands -- Related to #107

First part of #107.

I'll fix gen_python.py for #103 by merging it with the script driver/python/docs.py of the rethinkdb repo.


@atnnn would you mind taking a look at it?