The internal Vote method (called in a tight loop) was inefficient due
to expensive iteration and data structures, which meant that
attempting to generate larger maps could take days.
It is changed to leverage some shared pre-computation to reduce its
runtime complexity and replaces the use of Dictionary with a simple
reused array.
The semantics of the Vote method in isolation are slightly modified,
but this should not impact the quality of generated maps, especially
with current usage.