Ensure entity isn't destroyed when trying to show it. Fixes BUKKIT-2038

If two players (or a player and any other entity) are teleported to the
same location in the same tick they will both get added to the other's
destroy queue then have a new entity spawn packet sent. Next tick the
destroy queue will be processed and they will then be invisible to each
other. To prevent this situation we remove the entity from the destroy
queue when sending out a spawn packet for them.
Implement new scheduler API. Adds BUKKIT-836

The implementation for the new methods mimics the old methods. The final
call for the old methods now maps to the new methods with an additional
call to get id.
Queue tasks from secondary threads. Fixes BUKKIT-2546 and BUKKIT-2600

This change affects the old chat compatibility layer from an
implementation only standpoint. It does not queue the 'event' to fire,
but rather queues a runnable that allows the calling thread to wait for
execution to finish.

The other effect of this change is that rcon connects now have their
commands queued to be run on next server tick using the same
implementation.

The internal implementation is in org.bukkit.craftbukkit.util.Waitable.
It is very similar to a Future<T> task, but only contains minimal
implementation with object.wait() and object.notify() calls
under the hood of waitable.get() and waitable.run().

PlayerPreLoginEvent now properly implements thread-safe event execution
by queuing the events similar to chat and rcon. This is still a poor way
albeit proper way to implement thread-safety; PlayerPreLoginEvent will
stay deprecated.
Delegate tab-completion. Fixes BUKKIT-2181. Adds BUKKIT-2602

CommandMap now contains the functionality for tab completion. This
commit replaces the vanilla implementation and simply delegates it to
the Bukkit API.
Implement chat tab completion API. Fixes BUKKIT-2608. Adds BUKKIT-2607.

The chat tab completion implementation also includes a sanity check to
assure type-safety in the list.
Updated version to 1.3.2-R2.0 in pom.xml for RB.
Updated version to 1.3.2-R2.1-SNAPSHOT for development towards next release.
Made books less powerful, though you should still read them!
Updated version to 1.3.2-R3.0 in pom.xml for RB.
Update CraftBukkit to Minecraft 1.4(.2).
Don't pass vanilla plugin channels to plugins. Fixes BUKKIT-2638

Vanilla has its own handlers for plugin channel messages for things like
texture packs, books, and anvils. When vanilla handles one of these messages
we should not also pass it to plugins because they will be duplicating work
and potentially running in to situations our plugin system isn't setup to
handle. This is how 1.3.2 worked but was lost in the 1.4.2 update.
Fixed generator-settings not being set. Fixes BUKKIT-2652
Remove spawn-radius setting in bukkit.yml in favour of spawn-protection in
server.properties. Fixes BUKKIT-2657
These books are too powerful!
Fix incorrect method names missed during update. Fixes BUKKIT-2653

A couple method names were changed between 1.3.2 and 1.4.2 but were missed
in the update. One of these affects being able to enchant bows and the
other is used for updating player animations while firing.
Add new entities to World.spawn method. Fixes BUKKIT-2658
Fix missed rename for ore exp dropping. Fixes BUKKIT-2662
Use correct variable for squid Y motion. Fixes BUKKIT-2648
Don't filter item data for anvils. Fixes BUKKIT-2640

Filtering item data is usually a good idea to make sure we don't have
invalid data or data on items that shouldn't have it. However, anvils
use item data in slightly different way and so running its code for
filtering here causes the data to be corrupted.
Clamp difficulty levels to prevent invalid values

Some features added in 1.4.2 use the difficulty value as an index to an
array so while before having it set to an invalid value would do nothing
or maybe cause an odd side effect somewhere it now crashes the server. This
patch ensures difficulty values are clamped between 0 and 3, inclusive.