Israel's prime minister has warned aggressors face a "heavy price" - after separate strikes killed the political leader of Hamas and a senior Hezbollah commander.