Measurement of the differential cross sections for top quark pair production as a function of kinematic event variables in pp collisions at root s=7 and 8 TeV