simulator: add missing sim.h and sim.c; at this point, it compiles and links. I have not tried to run it.