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 target flashing for C4. Closes #4659
Unhardcodes RenderInfantry sequence names.
Improve Exts.Random by testing if the input sequence is a collection, thus avoiding the need to create a copy to get the count.

Using the ElementAt method also means that if the sequence is a list too, then the selection can be done via the indexer rather the enumerating the elements.
Reordered production palette according to prerequisites.
Put Minelayer.AT before Minelayer.AP
Compress/re-compress several custom shps of TD mod with XCC Mixer to reduce size.
Compress/re-compress custom RA mod shps with XCC Mixer to reduce size.
Compress/re-compress custom shps of D2k mod with XCC Mixer to reduce size.
add spaces for proper linebreaks in trait documentation tables
differentiate new/old Lua APIs
fix trait info documentation not being displayed
configurable and self-documenting BuildPaletteWidgetName
configurable and self-documenting color
configurable and self-documenting idle sequence name
don't just repeat the name of the trait, but explain
configurable and self-documenting font name
document traits
don't break apart when using empty IReadOnlyDictionary