(from D13 split)
Current formation code suffers from a number of problems, the foremost one being in my opinion that it forces code to be added everywhere for formation support, which is incredibly annoying and error prone.
As part of D13, I suggest removing it and replacing it with a group-walk order instead (see later patches on the GitHub branch). If we ever want to reimplement tight integrated formations, which should in my opinion do it as a single entity that deals with its own subunits or whatever on its own, without having to hack in other piece of codes.
This does not remove ALL the formation code because most of it is reusable later for the group-walk order, but I could change that if you want. In particular Commands.JS and UnitMotion.CPP are mostly unchanged.