Simulations of magnetic fields produced by asteroid impact: possible implications for planetary paleomagnetism