Make SerialVectorMatrixBuilder a template over matrix/vector types.

Also define types using Dense, CRS, and Lis linear algebra objects.