Add sparse_vector class.

This should be useful in several places where we want to use a sorted
vector of pairs to represent either a sparse vector or a dictionary.
Begin work on stats library for meta.

This is mainly to try to make it easier to follow things when we're doing
probabilistic modeling: instead of carrying around maps of parameters, we
should be using classes to represent the distributions themselves instead.
Port naive bayes classifier to use stats models.

(I think I've fixed a bug with it in the process, as it's doing much much
better now in terms of performance.)
Fix compilation with gcc.
Update (most) LDA models to use the distributions meta::stats.

This simplifies the code in a lot of places, and also provided me an
opportunity to fix the broken log P(W|Z) calculation in the collapsed Gibbs
samplers...
Merge pull request #43 from meta-toolkit/stats

Classes to represent multinomials and their Dirichlet priors