Rewritten HotProcessor.

This fixes the tests that failed in this class.
Merge conflicts fixed.

Changed PositionIndexer.randomFreePosition to a iterative
approach instead of a recursive one.