This diff moves the logic for gathering from `UnitAI` to `ResourceGatherer`. It would make it easier to allow modders to let e.g. structures gather resources.
Downsides:
- There are two timers per entity now, perhaps the one in UnitAI can be removed by checking the range in `ResourceGatherer`?
- There is an extra message sent now, although not often.
(See also #4293.)