Major refactoring of histogram classes.  Moved some common functionality into ND histogram from which 1D and 2D inherit.