As President Donald Trump pushes to deploy the National Guard in Democratic cities, a battle is escalating over the use of troops to support a crackdown on illegal immigration – testing the balance of powers between the executive and judicial branches.