MAHOUT-1580 Optimize getNumNonZeroElements()

Can someone have a look at the changes? The basic idea is to directly work on the internal datastructures instead of going through the non-zeroes iterator.

A quick benchmark should 7x performance on dense and 3x performance on sequential access sparse vectors.