Added unit test to verifies that resized histograms are merged correctly. Discovered that TProfile merging did not merge statistics, added fix for that.
Closes ADHI-4688