Ensure unloadFMU is called only if FMU instance (pointer) exists
Previous assumptions of unloadFMU was that there was a valid C-level
pointer to cleanup and pass to the FMU model's cleanup functions.
However, if only loadFMU is called prior to unloadFMU, then JVM would
crash with an access violation exception. I introduced a boolean for
instantiated to keep track of this to ensure we avoid future crashes if
unloadFMU is called directly after loadFMU.