Input: Use shared_ptr for passing fake input events
Unfortunately, creating them on the stack leads to crashes since we end up with queued connections due to crossing thread boundaries. As we were only passing around pointers we ended up with pointers to released memory.
Since the ownership isn't quite clear, instead store the events in a shared_ptr and pass those around, to ensure things stay around long enough for them to be used, while not staying around longer than necessary.