Allocate ContribRow.Weights as one big chunk of RAM.

Previously, each ContribRow entry contained a pointer to an array
of double (now renamed weight_t) containing the weights.  Previously,
each of these was alloc'd (as one would expect) but this change makes
the code alloc them as one contiguous chunk of RAM and then point
each Weights pointer to the appropriate offset in the chunk.

This yields a significant performance improvement.