Before this change, the input state was reset at the end of a tick.
This means that wheel deltas or input chars in a tick might be reset
unexpectedly.
This change fixes the issue by reseting the input state immediately
when reading, so that wheel events and input-char events are preserved.
Updates #2496
Updates #2501
Before this change, input states were reset for each frame. When FPS
is bigger than TPS, the input state was reset more often than expected
and then some inputs were missing.
This change fixes the issue by resetting input states not for each frame
but for each tick.
This change also updates some comments of the input API.
Updates #2496Closes#2501