Fix overflow on histogram computation

Patch by cyeksigian; reviewed by jmckenzie for CASSANDRA-8028
Merge branch 'cassandra-2.1' into trunk