Object-oriented definition of Vector and Matrix

This approach simplifies the code.
The class automatically manages copies and allocations of memory.
It also uses its destructor to free the memory for both CPU and GPU.

The impact of using accessors instead of direct accesses is negligeable.