Use caching and skip some checks in runtime.

This turned out to shave almost 0.5% on mobile in timeline.
Use integer values for positioning.

Also do not touch the timeout(s) in animation hadnling as it slows down
significantly the raf on mobile android. Instead extract the method in touch
end handler.
Use text instead of HTML for model reflection.

Faster on mobile android and does the same job.
Call paint notify directly from mouse handler.

No need to delay the image painting on desktop (mouse).