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.
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.
Improve game loop

Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
Make FieldLoader/FieldSaver able to work with private fields

* Unify the FieldLoader-related attributes (Ignore, LoadUsing,
FieldFromYamlKey) into a new 'Serialize' attribute. Keep the
previous attributes as shortcuts/aliases to the new attribute.

* Add 'YamlName' field to the new 'Serialize' attribute to allow
yaml names different from the field names. Example:
    [Serialize(YamlName = "Width")]
    private int widthExpression = "0";

* The FieldLoader will treat private fields like public now and
will try to load their values. The FieldSaver gets an optional
parameter specifying whether to save private fields by default.
The 'Serialize' attribute can be used to fine-tune individual
fields.

* Updated the traits documentation exporter to write the yaml
name if it has been overriden.
Trivial typo in exception message
Use available TypeConverters to serialize and deserialize types
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.
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 bibs to refinery and factories
these are already fixed with the addition of isometry
Merge pull request #5998 from Mailaender/ts-bibs

Added bibs to Tiberian Sun refinery and factories
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