Added (temp) code to only compute non-zero document values.
This happens when doing cosine similarity.
The complexity is reduced (almost) from O(d*k*n) to O(d*nz).