Dollar slips, gold hits record as markets brace for shutdown