hist: better binning duck typing with __iter__
hist: fix lowerbound and upperbound indexing