Refactoring pass.

- Extract an enum for edges rather than using magic numbers for everything.
- Remove duplicated code between FoggedEdges and ShroudedEdges by hosting the visibility function into a delegate.
- Make minimap methods more readable.
- Tidy formatting.
- Make some fields readonly.
- Remove unused usings.
Sped up shroud rendering.

- Only update shroud within the visible screen area, rather than the whole map. This improves performance on larger maps significantly when scrolling around since large portions of the shroud do not need to be updated.
- Provide methods in Shroud to return delegates to check for explored/visibility for tiles within a certain region. This allows it to return more efficient delegates whenever the region is within the map bounds, or shroud/fog is disabled. In the typical case where the region is in bounds and shroud/fog is enabled, the fast check is almost twice as fast as the slow check.
- Use the Shroud delegate functions in shroud rendering, frozen actors, minimap rendering and resource layer areas to provide a speedup since these areas of code can often take advantage of the fact they perform checks within the map boundary.
- Cache current element in CellRegionEnumerator to prevent repeated work if the element is accessed more than once.
- Decrease the size of elements in some arrays in hopes of reducing memory needs and improving cache hits.
Add tech levels to ra
Sped up ActorMap.ActorsInBox.

- By ensuring both the add and remove actor lists are sets, we ensure the partitioning bins will contain only distinct actors. We can remove the HashSet and Distinct in ActorsInBox and ActorsInWorld which provides a nice speedup for queries. ActorsInBox sees nearly a 3x speedup in the RA shellmap.
Fixes Light Post. Closes #5903.
Doubles Refinery storage capacity.
Added ^Tank default, adjusted movement penalties on terrain types.
Reduce infantry sequence tick values, fix Cyborg Commando idle shadow.
Improve game loop

Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
Add AllowInvalidPlacement check to IsCellBuildable. Fixes #5902.
Allow NormalizeSequence to remove existing damage prefixes.  Fixes #5909.
Merge pull request #5907 from reaperrr/misc-ts-fixes

More TS fixes & tuning
Merge pull request #5912 from pchote/powr-fix

Allow NormalizeSequence to remove existing damage prefixes.
Remove redundant overload and return early if outside map.
Make tiles sorting deterministic in all cases

This may fix issue #5916.

In any case, it's wanted because this kind of sort is "unstable".
According to the docs:

    "This implementation performs an unstable sort; that is, if two
    elements are equal, their order might not be preserved."
Merge pull request #5911 from pchote/concrete-fix

Add AllowInvalidPlacement check to IsCellBuildable.
Merge pull request #5901 from ScottNZ/techlevel

Add tech levels to ra
Added D2K Tech Levels
Merge pull request #5898 from MustaphaTR/d2k-techlevel

D2k Tech Level
Fixed typo in HackAI building placement code