matrix_expression: Unified code base with vector_expression. Also removed a spurious debug output.

vector_expression was using the same functionality under a different name (result_of::reference_if_nonscalar<>).
As that is already extended for use with integers, this is now used in matrix_expression as well.