Chancellor Philip Hammond has threatened internet giants with a new digital services tax to ensure they pay their fair share of the cost of public services.