Put most of bellman.main into Cython.  Need to follow up on a couple of the types.