The deadlock that left the Department of Homeland Security shut down highlighted Republican divisions that are flaring ahead of the midterm elections.