Centrality dependence of the multiplicity and transverse momentum distributions at RHIC and LHC and the percolation of strings