These variables together held the state for the target of UnitMotion, as set by the MoveTo[X] family of functions.
Wrapping them in a struct reduces the chances that one will accidentally forget to reset part of the state and makes it explicit in-code that these are grouped together.
We also reset these when calling StopMoving(), which was missed before (and which left us in a half-broken state). D1886 makes this fine since unitMotion is no longer stopping on its own.