Made Memory fields private and added test methods.
Cleaned up Memory a bit.
Made fields in CArraySparseTemplate private.
Made fields in CArrayDenseTemplate private.