Use command block's world for /gamerule. Fixes BUKKIT-3274

In vanilla, gamerules are global, across all worlds. Maps created for vanilla that use command blocks expect this behavior, which is broken when they are placed on a world that is not the default world (world #0).

This commit fixes the /gamerule behavior for custom vanilla maps using command blocks when they are not on the default world.
It does not fix the issue of gamerules for non-default worlds not being changeable from the console; however, that is not covered by the Leaky ticket.