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