Turn off mouse polling interrupt if the mouse hasn't been moved for some time

As discussed in private mail, this change turns the high-frequency polling interrupt off if there is no mouse movement for some time (0.5s). It works very well, I don't see a difference in the feeling compared to the old version.