Fix a NaN transformation when using 4-point perspective transform
It appeared that my matrix decomposition could not decompose an
identity matrix :( Well, we need to implement a better one, e.g.
from CSS. For now just avoid division by zero.
Most probably, the problem appeared after introduction of cursor
snapping. Before snapping identity matrix was almost impossible
to get with a mouse cursor.
BUG:372677
Ref T4840