Factory data lifts stocks, dollar gains on U.S. election jitters