Change the entity id type from int to long.

This allows us to drop in future the free list and meta data tables.
Don't reuse entity ids.

Reasoning:
- The entity ids are now of type long and should thus not reoccur.
- It allows for further simplifications.
 -> It is no longer necessary to manage external references.
    As they where mainly needed to check if the refrences
    of a restored entity are still valid and thus have not been reused yet.
Don't maintain and restore external references.

This code simplification is possible, as ids do no longer get reused.
Added a number of class/method-level javadocs. Added a few comments. Renamed a few variables and one method. Moved three small instations to the head of the mainLoop() method and out of the main loop proper.
No functional changes: only reodering of methods. First are initialization/constructor-supporting methods, followed by life-cycle methods, state handling methods, accessor methods and finally methods that didn't fit anywhere. If feasible/meaningful, within each category methods tend to be listed after the methods they support, while in some cases it was possible to keep related methods together even if they cross category-boundaries. Also fixed a small typo.
Merge PR #1411 by @flo - entity id refactoring
Fix some tests by properly initiallizing the nextId field.
Removed a test that is no longer relevant as ids do not get reused.
Prevent reads during the merge of the prepared world changes.

This prevents issues when a chunk/player gets loaded while the file they
are reading from gets replaced.

For details have a look at the javadoc of:

STorageManagerInternal#worldDirectoryLock
Merge branch 'develop' of github.com:MovingBlocks/Terasology into upgrade_versions
Re-generated protobuf java files with compiler v2.6.1