Multiple bugfixes [SEE DESC]

* Fixed compilation on VC2013
* Fixed redstone self powering - still one more scenario to go
+ Redstone now powers block beneath
* Improved code: functionized stuff, and reduced unneeded GetBlockMetas;
also utilised direct chunk access, as recommended by xoft
+ Added torches powering blocks above it
* Fixed repeaters getting power when they shouldn't
- Stopped wires getting power from another wire through a block, which
could lead to wire-powering loops (vanilla behaviour)
Multiple enhancements [SEE DESC]

+ Added lever location checking
* Fixed button location checking
* Fixed button pressing/unpressing
* Fixed repeaters updating
* Minor enhancements
Fixed spawning pickups with piston arms
Fixed some piston bugs

Due to our QueueSetBlocks, a fast extension then retraction would lead
to invalid game states. This hopefully fixes it. Also reduced delay
speed.
Properly fixed piston bugs
Expanded one-line if statement
Fixed some comments and added debug logging
Merge remote-tracking branch 'origin/master' into redstonefixes
Merge remote-tracking branch 'origin/master' into redstonefixes
Fixed repeaters not powering from wire

This should also fix comparators (in the future).
This also updates XML comments so that they are compatible with Doxygen.
Fixed spawn point being generally in an ocean
Merged master into redstonefixes
Made TNT pickups spawning chance 25%
Improved TNT pickup randomisation
Fixed a bug with TNT waking simulators
Merge pull request #362 from mc-server/redstonefixes

Multiple bugfixes