some fixes for VC++
a unit does not know its unit_info anymore. Debugging info are optional and should be stored externally
fix dangling pointer to a function_ref