Added event listeners for mouse up, down and out

There is a bug where when you start drawing, it draws a line from the
right side. Can be bypassed by first clicking the canvas
Added function for clearing canvas

Needs a button or something
Merge branch 'master' of https://github.com/reedyn/Paintly