A day after attacks by Palestinian gunmen killed two soldiers, Israel imposed widespread closures, displacing residents in the city of Hebron.