The strike on chemical arms sites reflected President Trump’s competing impulses: an effort to demonstrate strength countered by a view that involvement in the Middle East since 9/11 has been a waste.