Convert Accumulator to take a BlockBuilder

Follow https://github.com/facebook/presto/issues/2042
Add a helper method for this