Allow inclusion of xio.h into the source; reduced the number of ifdefs; extracted sim_types.h from sim.h