completed the function 'diagonal' that returns the kth diagonal of a rectangular matrix, added function in PMatrixSubComponents protocol, default implementation and tests.
(does not handle k values that are out of range)