Add DedicatedServerConnectionThread from mc-dev for diff visibility.
Restore configurable connection throttle.
Print short message on exception to avoid spamming console. Fixes BUKKIT-2018
Process entity ticks on worlds without players. Fixes BUKKIT-2031

Both the CB 1.3.1 code, and vanilla 1.3.1 code, have modified the
behavior of entity tick processing in a way that can lead to disabling
of entity cleanup. Specifically, the tickEntities() call in n.m.s.World,
which processes both the entity cleanup (removing from the world entity
list) and tile entity tick processing (furnaces and such) does not get
called by n.m.s.MinecraftServer's q() method (which drives tick
processing calls in general) when no players are on the given world.
This causes a serious memory leak when automation processes, like dynmap
mapping, load and unload chunks - as entities on unloaded chunks are
only cleaned up during entity tick processing. It also will cause issues
with any mods that use persistent chunk loading (that is, keeping chunks
loaded so that tile entities will continue being processed), since such
processing will no longer function without at least one player on the
given world.

In any case, the tickEntities() call should be called in the same
fashion as under 1.2.x (each tick, independent of player population, as
opposed to being suspended indefinitely when no players are on the given
world). The specific memory leak observed, with removing the unloaded
entites from the world, requires this call be made regularly (or, at
least, whenever the entity unload queue (world.g) is not empty.

Closes GH-832
[Bleeding] Fire inventory close event. Fixes BUKKIT-2036
Fix 1.3 changes that prevent nether and the_end to save level data.
Don't merge items with enchantments. Fixes BUKKIT-2050
Implement new AsyncPlayerChatEvent. Addresses BUKKIT-2064

Added two utility collections for use with PlayerChatEvents allowing lazier
initialization of events and less need to synchronize against the player
list.

Provided a hidden queue system for similar logic to pre-1.3 chat. When a
plugin is listening for the deprecated PlayerChatEvent, all chat will be
delayed to be mirror executed from the main thread. All developers are
encouraged to immediately update to the developmental Bukkit chat API as a
minimum transition for server stability.

Additionally, changes were required to bring thread-safety to the flow
logic. CopyOnWriteArrayList is the only viable means to produce thread
safety with minimal diff; using a sane pre-implemented collection would
require reworking of sections of NMS logic.

As a minor change, implemented expected functionality for
PlayerCommandPreProcessEvent. Setting the player should now change the
player executing the command.
Fix PlayerBucketEmptyEvent handling. Fixes BUKKIT-2002 and fixes BUKKIT-1997

The method this.a(world, d0, d1, d2, i, j, k) is responsible for
actually placing the lava or water source block in the world. The event
is currently called after this method, thus canceling the event will
cause the player to keep their water/lava bucket but the water/lava will
still appear where they attempted to place it.

In addition, the check for whether a player has creative inventory is
short circuiting before the event fires, so the event will not be called
for these players.

This moves the event call and cancelled check above these two calls to
ensure it always fires and the results of it are honored.

Closes GH-835.
Potentially fix chunk leaking, needs further examination
Correctly detect invalid PistonExtension's to allow removal of StickyPistons. Fixes BUKKIT-2059
Re-implement code missing from leaving the end. Fixes BUKKIT-2003
Fix chat not being cancellable when not using deprecated API.
Avoid CME when lightning strikes by making a copy. Fixes BUKKIT-2055
Don't tick chunks or entities on chunks that are queued for unload.

Treat chunks in the unload queue as if they are already unloaded to prevent
processing on them removing them from the unload queue and leaking.
Add AABBPool for diff visibility
Fix bounding box pool to use a dynamic cache size

Also changed insane array copy routine. This should reduce server lag
spikes that occur periodically.
Fixed PlayerManager ConcurrentModificationExceptions. Fixes BUKKIT-1972
Don't use Packet56 and clear client cache on world changes.
Put forceChunkLoad back to its original value.