Return the valid max value for piston direction. Fixes BUKKIT-2191

By returning the following value (7) we remove the need to special
case pistons in any way (other than the original purpose of this
check, which is to ensure pistons have valid data)
Reload ban files when reloading the server. Adds BUKKIT-3470
Compensate for allow-nether/allow-end as false; Fixes BUKKIT-3466

When either of those settings are false, the worlds are not loaded and
therefore will not be targeted for portal exits.  Existing worlds are
iterated directly to avoid defaulting to the first world if a direct
dimension match is not found.

Plugins must also specify exit from custom Bukkit worlds to comply with
original commit: https://github.com/Bukkit/CraftBukkit/commit/2dc2af0

This commit introduces a constant to clarify the dependency on the
CraftBukkit implementation of custom worlds having a dimension offset.
Call BlockPlaceEvent for skulls the same as other blocks. BUKKIT-3406

When the skull BlockPlaceEvent was added it was made so the event
would be called after all the data has been set, however this is a
behavior change that is inconsistent with other BlockPlaceEvents.
Instead, if people wish to get the block data they should schedule
a task.

Relates to: BUKKIT-3438
Properly calculate level cost for books. Fixes BUKKIT-3410
Preserve source block in mushroom spread event. Fixes BUKKIT-3354
Add BlockCocoa for diff visibility.
Call BlockGrowEvent for Cocoa plants. Fixes BUKKIT-2525
Fix TileEntities and Blocks getting out of sync. Fixes BUKKIT-3501

Also fixes: BUKKIT-3477 and BUKKIT-3488

Minecraft likes to double check that tile entities get set after they
are placed, however we didn't set tile entities until after our event
was called. This caused the world to have multiple tile entities in a
single block location; to fix this we now set tile entities before
the event.
Direct all BlockPlaceEvents to a singular location. Fixes BUKKIT-3438

By having a single function to process BlockPlacement logic, we make
it so that there is consistent behavior throughout all BlockPlace
events. This should allow for easier troubleshooting and less diffs
in source.

This also fixes BUKKIT-3463 by including the correct coordinates that
were clicked to the event.
Ignore block functions for skulls on BlockPlace. Fixes BUKKIT-3495

Skulls don't normally get block data applied to them, so we shouldn't
apply it either.
Update Fireballs to account for ExplosionPower. Fixes BUKKIT-3460
Adds BUKKIT-3516
Remove erroneous break statement in scheduler. Fixes BUKKIT-3395
Target default world when returning from The End; Fixes BUKKIT-3494

Due to the having to generate new logic to avoid using the customized
PlayerConnection.moveToWorld, entities returning from The End were not
properly calculating their exit target.  This commit corrects that
logic.
Make command blocks only select players on its world. Fixes BUKKIT-3515
When leaving the end, always target the main world. Fixes BUKKIT-3517
Fix contract with Player.getBedSpawnLocation. Fixes BUKKIT-3525

Getting the bed spawn location is supposed to check if the bed is
valid, however, it currently did not do so.
Fix NPE when getting bed spawn location.