Fix Mouse position in canvas with margins or padding

The mouse position in an element is measured from the top left corner. When a margin or padding is used this starts outside the drawable area of the canvas. This needs to be taken into account.
Restructure added redundancy
Update quintus_input.js
Correctly calculating mouse position
Reverted changes
Merge pull request #120 from mpkorstanje/patch-3

Fix Mouse position in canvas with padding