Make AnvilInventory.getItem() use both containers. Fixes BUKKIT-2788

The AnvilInventory reports its size as the sum of the ingredient and
result inventories, but when trying to access the slots, only the
ingredient inventory is used, leading to an ArrayIndexOutOfBounds exception.

This change overrides getItem(I) and setItem(I) to use both inventories,
with the slot number adjusted based on their size.

(cherry picked from commit 1352c499651cd3e4a84902add9d59d0b3df12588)