Impact demagnetization of the martian crust