Implements ES5-style callbacks for cursor forEach and map.

Fixes #63.

Based on iwoj's PR.

Needs tests and docs.