Assembly functionality template

Added a template for the matrix assembly functionality (finalizeMatrixAssembly()) and a test for the assembly functionality using the (template) class GlobalDenseMatrix.