Add accessor for totals to histogram class

numSamples, sum, and avg can now be accessed in a clean way via the
:totals() method. This fixes a problem whereby the fields could be
accessed while they were in dirty state.
Merge pull request #17 from duk3luk3/histogram

Add accessor for totals to histogram class