Implement ItemStack.hasMetadata

I have to admit I'm not sure what specific use cases will result in the
base ItemStack methods getting called, but this is generally the
correct thing to do, and let descending classes override for
optimization purposes.