A Republican debate that was supposed to focus on the presidential candidates' economic policies demonstrated their close agreement on the fiscal front but underscored foreign policy rifts that are likely to play out through the 2016 campaign — and gave renewed life to candidates struggling to find their footing in a persistently unpredictable contest.