DRY definition of _Monkey class used for testing.

Move to a non-testcase module, to avoid dependencies between testcases.