Fix Dirichlet.logDraw of SparseVector (wasn't summing to 1.0)
Merge pull request #95 from dhgarrette/master

Fix Dirichlet.logDraw of SparseVector (wasn't summing to 1.0)
Replace ThreadLocals by variables.
Synchronize cache update in Cached(Batch)DiffFunction.
no need for synchronized.