A sweeping Democratic victory in the US midterm elections has dealt President Donald Trump a major political setback, with voters handing the Opposition control of both chambers of Congress and delivering a sharp rebuke to his economic and foreign policy record.