Fix a crash when double-clicking a replay with an unknown map.
Merge pull request #6800 from pchote/fix-replay-browser

Fix a crash when double-clicking a replay with an unknown map.
Add chrome for slider thumb.

update hardcoded references to chrome.yaml to use public parameters.
Merge pull request #6814 from steelphase-forks/bleed-slider-thumb

Add chrome for slider thumb.
Rewrite shp(ts) parsing to avoid offset issues.  Fixes #6822.
Make the legacy editor more robust against invalid templates.
Merge pull request #6824 from pchote/external-editor-templates

Fixes #6812
Merge pull request #6823 from pchote/fix-shpts-offsets

Closes #6020
Lazily generate buffer in Sheet.

The managed byte buffer is created on demand, meaning a newly allocated sheet will not waste memory holding onto the buffer until some changes are actually required to be written. This avoids a newly allocated sheet wasting memory on buffers that do not differ from their backing texture.
Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Release sheet buffers in SequenceProvider and MapCache.

The buffers in SequenceProvider can be freed if Preload is called, since we know everything is loaded. A SequenceProvider is created for each TileSet is use so this saves memory for however many tilesets had been used in the game. This will be at least one for the shellmap, and often more.

The MapCache loading thread is kept alive for 5 seconds after it last generated a map (in anticipation of more requests). Once this time expires the thread is allowed to die, as it is unlikely there will be more requests in the short term. At this time it is ideal to force the changes to be committed to the texture so we can release the buffer. As well as marking the buffer for release, we must access the texture to force the changes stored in the buffer to be written to the texture, after which the buffer can be reclaimed.

Additionally, when starting the MapCache loading thread we must ensure the buffer is created from the main thread since it may query the texture object which has thread affinity. After that the buffer may be modified freely on the loading thread until released.