Improved mouse cursor handling

If the mouse pointer changes but has the same size
as before, the texture will be updated.
The mouse pointer is now moved with a matrix function.