Matrix primitive types for issue 1082

Matrix primitive types for issue #1082. All tests are passing, and all of the sandcastle apps appear to be working correctly.

Also changed some prototype clones for other types to use the static clone.