Update chest animation after cancelling InventoryOpenEvent. Fixes BUKKIT-1440

Currently if a plugin cancels an InventoryOpenEvent for chests,
the chest animation for clients is stuck in the open state since
IInventory's l_() method, which is responsible for inventory related
cleanup logic, is never called.  To fix the issue, l_() is called
before exiting the display GUI method.

Also in this commit, a few craftbukkit formatting mistakes were fixed
in similar inventory related methods.

Pulled from PR #1312