benchmark: add "accumulate" method
* keeps track of the number of calls and the total time spent

(integrated from trunk branch change a3dba6e by Todd Whiteman <toddw@activestate.com>)