Implemented accumulators

Now everything is in a single commit and merged with the current master.

Old pull request with discussion: https://github.com/stratosphere/stratosphere/pull/32