add hist!, which accepts a pre-allocated array to store the output
add hist2d! that accepts a pre-allocated result array
add documentation for hist! and hist2d!
Merge pull request #6217 from lindahua/dh/hist2

Add functions hist! and hist2d!