Four Palestinians have been killed after attacking Israeli soldiers in three separate incidents in the occupied West Bank, Israel says.