Berlusconi ally resigns after jibe at terror victim