Rework skull dropping. Fixes BUKKIT-2930 and BUKKIT-2820

Skulls need their tile entity in order to create an item correctly when
broken unlike every other block. Instead of sprinkling special cases all
over the code just override dropNaturally for skulls to read from their
tile entity and make sure everything that wants to drop them calls this
method before removing the block. There is only one case where this wasn't
already true so we end up with much less special casing.
Update tile entity on client on cancelled block break. Fixes BUKKIT-2935

When a client tries to break a block it assumes it has done so unless told
otherwise by the server. This means the client also wipes out any tile
entity data it has for the block as well. We do not send this data when
updating the client so clients lose things like text on signs, skull type,
etc when they aren't allowed to break the block.
Don't thread single chunk compression. Fixes BUKKIT-2927

Packet 51 is used to send updates about large changes to single chunks
and to remove chunks from the client when they get out of range. In the
first case a single packet object is created and queued for all relevant
players. With our current chunk compression scheme this means the first
player to have the packet processed will start the compression and get the
packet correctly but the rest will get garbage.

Since this packet never contains much data it is better to simply handle
compression of it on the main thread like vanilla does instead of putting in
locks and dealing with their overhead and complexity.
Remove fire ticks if damage has been canceled. Fixes BUKKIT-2933
Update CraftBukkit to Minecraft 1.4.5.
Update tile entity when interact event is cancelled.

If a plugin cancels a PlayerInteractEvent when left clicking a block the
client may have removed this block if they are in creative mode or if the
block breaks in a single hit. In this case, we need to update the client's
tile entity as well as telling it the block still exists.
Use synchronous calls and wait for chat disconnect. Fixes BUKKIT-2946

When invalid chat is detected we currently drop the connection with no
hint as to why as anything else is not allowed while we're off the main
thread. To give valid disconnect reasons and fire proper events instead
pass these off to the main thread and wait for it to process them.
Ignore empty custom payload packets. Fixes BUKKIT-2957
Don't create tile entity when block placement fails. Fixes BUKKIT-2924

End portals can only be placed in the end during the dragon's death.
Attempts to place them outside of this window causes the block to remove
itself. However, we still create the tile entity for the portal which
leads to exceptions spamming the console about a tile entity existing
without the appropriate block. In these cases we should not place the tile
entity at all.
Don't wait for main thread when processing commands.

In order to correctly handle disconnects for invalid chat we setup a
Waitable and pass it to the main thread then wait for it to be processed.
However, commands are also chat packets and they are already on the main
thread. In this case, waiting will deadlock the server so we should just
do a normal disconnect.
Fire BlockFadeEvent when soil turns back to dirt. Fixes BUKKIT-1854
Add BlockVine.java from mc-dev for diff visibility.
Fire BlockSpreadEvent for vine growth. Fixes BUKKIT-1097
Implement API for Skeleton and Zombie types. Fixes BUKKIT-2818
Don't kick player when they travel too far. Fixes BUKKIT-2968

If a player travels past 32,000,000 blocks on the X or Z coordinates they
will be kicked for having an illegal position. On kick their player data
is saved which includes their (illegal) position. This means on join they
are immediately kicked again for the same reason and are stuck. Instead of
kicking at all in this case just teleport the player back to their previous
position just like the moved wrongly check does.
Don't show a player on map if they're vanished. Fixes BUKKIT-1882
[Bleeding] Use case from player data for OfflinePlayer. Fixes BUKKIT-519

If a plugin looks up a player that is offline they may not know the correct
capitalization for the name. In this case they're likely to get it wrong
and since we cache the result even after the player joins the server all
future request for an OfflinePlayer will return one with incorrect case.

When looking up a player who has played on the server before we can
get the correct case from the player data file saved by the server. If
the player has never played before this point we cannot do anything and
will still have the same issue but this is not a solvable problem.
Use correct itemstack for dispenser behavior chaining. Fixes BUKKIT-2886

When an event changes the item to be dispensed we check to see if the new
item has special behavior for dispensing and if so pass it on to that
behavior handler. However, we are actually checking the old itemstack and
passing the new itemstack so this check fails.
Implement sound changes for Minecraft 1.4.2 changes. Fixes BUKKIT-2849
Lower compression level to avoid overloading the thread. Fixes BUKKIT-2963

When sending chunks to a player we use their writer thread to do chunk
compression to avoid blocking the main thread with this work. However,
after a teleport or respawn there are a large number of chunk packets to
process. This causes the thread to spend a long period handling compression
while we continue dumping more chunk packets on it to handle. The result of
this is a noticable delay in getting responses to commands and chat
immediately after teleporting.

Switching to a lower compression level reduces this load and makes our
behavior more like vanilla. We do, however, still give this thread more
work to do so there will likely still be some delay when comparing to
vanilla. The only way to avoid this would be to put chunk compression back
on the main thread and give everyone on the server a poorer experience
instead.