The U.S. trade deficit widened for a second month in October, as the value of imports increased and exports declined, which may weigh on economic growth in the fourth quarter.