Event-handling

I tried to use two instances of xgui, but the event-hanfdling was in the way, so now it only listens to the container on mousedown, touchstart, and adding mouseup, mousemove and corresponding touch events only when needed.