Fixed getID() returning -1 for some units acquired through getOrderTarget etc.

Units did not have their ID set until they were first accessible, so if you somehow got the pointer to a unit that was never accessible, its getID() would return -1.
Merge pull request #523 from tscmoo/dev

Fixed getID() returning -1 for some units acquired through getOrderTarge...