Charged-particle production as a function of multiplicity and transverse spherocity in pp collisions at √s=5.02 and 13 TeV