Add intstats

These functions are for (weighted) counting of integers. This patch finishes the migration of stats functions from MLBase.