tests: Rework the fuzzy comparison macros

Simplify the condition checking, and add a specialized fuzzy comparison
macro for matrices that takes the row and column being compared.
tests/matrix: Improve compare_matrices()

Use the newly added, matrix-specific fuzzy comparison macro to improve
the output of the check in case of failure.