tests/matrix: Simplify compare_matrices() macro

Instead of per-element access through the API, just dump the matrices
being compared into arrays of floats, and access those.