Updates in the math utilities

- Added matrix_data_ref.
- Backporting in matrix constructors.
- Added forward declaration header.