Issue #2527: Add a *globals* argument to timeit functions, in order to override the globals namespace in which the timed code is executed.

Patch by Ben Roberts.