EMI: Save and restore chore instance IDs.

Previously chore instance IDs stored as Lua userdata became invalid after
loading a save, because the chores were recreated with different IDs. This
caused certain opcodes like StopChore to fail.