A child has until the age of two-and-a-half to establish healthy gut bacteria — with little change after this point, new research has revealed.