Keep track of original types during monomorphization

Unfortunately this required an interface change, because the types have
to be passed back to Atdgen from Atd_expand. Maybe a better option is to
create new functions with the (module, original_types) return value,
leaving the originals alone. But it appears there are no other clients
of these functions in the Atd or Atdgen codebases, so maybe it's OK to
change the interface.