cleanup and optimize the OCaml code

lambda-lifting is not always a winning optimization, but it's worth
trying it in the critical section -- the compiler itself rarely
does. In this case it gives a 15% boost on my machine.

The readPlaces change is only cosmetic.