Fixed crash with failed entity-loading.

This should fix issues reported in:
http://forum.mc-server.org/showthread.php?tid=1328
http://forum.mc-server.org/showthread.php?tid=1308
Fixed a few compile-time and runtime warnings in ScoreboardSerializer.