Improved performance.

* Using old-school for loops instead of enumerators, where possible,
gives an increase in performance of roughly 10% and more in some tests.
The Shield code is now, unfortunately, peppered with "#if USE_STD_HASHSET",
but I feel it is important to keep that option available, just in case.

* ALSO, fixed build errors for when the SERVER symbol is defined.