Added touch support, emulating mouse events, generalised as cursor events. Also made the debug entity follow the cursor again, but offset.