HandleSharingChange and its children
Currently HandleSharingChange and the functions it calls are a little ugly to say the least. The main cause for this is that sharing changes make reserved paths etc invalid. This means that we e.g. don't know which tiles to unreserve when a train is deleted, so we have to check all tiles which is very expensive.
If we call this function while everything is still valid (reading the new settings in sharing_future), this could be done in a much nicer way.
Small code snippet as reminder to self:
CompanySharingSettingsEntry *settings_to_use = c->sharing_delay == 0 ? &c->sharing_future : &c->sharing_currrent;