The US economy expanded in the third quarter at the fastest pace in two years, bolstered by resilient consumer and business spending and calmer trade policies.