Several thread-safety fixes

This commit fixes several problems with unsafe access to variables.

- Do not use onMove, it's called too often, use scheduled task instead
- Do not call Inventory.contains from an async thread
- Do not serialize Inventory from an async thread
- Do not cancel an event after the event method has been returned
- Do not access a map in an async thread and remove entries from it