Measurement of double-differential cross sections for top quark pair production in pp collisions at root s=8 TeV and impact on parton distribution functions