Performance fixes and better threading

The performance of the control was quite awful so I put all the
calculations into a separate thread away from the UI thread.

Also, the touch is now handled through a Touch FrameReported event which
allows multitouch and better performance when compared to the mouse
events used earlier.