Merged most of the changes from pull request #1 - had to be done
manually, because of the other changes. The only changes skipped
are changes int32 -> int4 (I'm already using int32 in the code,
so I've kept it for consistency - I'm not aware of any difference).
[1] https://github.com/tvondra/distinct_estimators/pull/1