Donald Trump’s threat to send troops to San Francisco marks a massive test of first-term Mayor Daniel Lurie’s administration.