Mostly fixed interactions with the GUI

Fixes:
1. checkForCompacting() is only called once each time something changes
in the inventory
2. The client side receives an update after the output sequence is
called, by called container.detectAndSendChanges()
Remaining issues:
1. The last item placed in the GUI remains there on the client side
after everything else updates. When you try and pick up the item it
disappears, if you close and reopen the GUI it disappears
2. The items in the GUI don't save when the world is closed and reopened