mat: add error handling when asking to slice to 0
Created by: ahlusar1989
Addresses #551 (closed) .
WIP - needs tests and clarifications on any other edge cases I have missed from @kortschak. So far I have only one condition to check if i is relative to k and j is relative to l.
All tests pass and code is formatted.