Added fix for ItemAdded/Removed events sometimes being delayed; also added some basic safety checks.
BUGFIX: OnUserAddItem is sometimes called twice for one item... :|
Adding changes suggested by Husky (Scholtz)
Merge pull request #632 from BlueRaja/AddItemCallbackDelayed

Added fix for ItemAdded/Removed events sometimes being delayed