Pulling up quick-return logic for diagonal matrix multiplication into GenericMatrix class

My first 'pull reuqest'