Added methods to Matrix2D: invert() and isIdentity()

These are actually not used but may not harm you.