Implemented IEquatable<T> to speed up equality comparisons.

Actor, CPos, CVec, WAngle, WPos, WRange, WRot and WVec structs now implement IEquatable<T> which means unboxing/casting costs can be eliminated.

Also simplified the ToString method by concatenating components directly rather than using a format string since the overhead is a bit high for simple cases like this.
Added MinBy, MaxBy, MinByOrDefault and MaxByOrDefault methods and replaced calls of the style OrderBy[Descending]().First[OrDefault]() which is not as performant.
Also implemented on the Bits<T> struct.
Add IReadOnlyList
Cache some dictionary lookups in FrozenUnderFog.Tick.

Since FrozenUnderFog.Tick gets called a lot, these dictionary lookups were actually getting repeated a fair amount. Avoiding the repeated work is a minor performance improvement.
Avoid multiple enumerations of armaments in AttackBase.

- Avoid enumerating the collection more than once in a method as it is not trivial.
Make repair animation pause if player has no money.

use anim.Paused

removed the using line
Fixes to StreamExts.

- Almost all calls to Stream.Read were broken. These have been patched to all go through ReadBytes which itself has been fixed to function correctly. The key thing to note is that Stream.Read is very much allowed to return less than the requested number of bytes. If this happens and you're not checking the return result, you'll be working with partially initialized arrays and really bad stuff happens when you do that.
- Call CopyTo rather than copying between streams manually.
- Peek and ReadUInt8 have been changed to avoid a pointless array allocation which is significant overhead for such simple calls.
Refactor AutoTarget scan and GPS interaction, and cache trait lookup for a slight performance boost
Adds/reworks some minibibs
Merge pull request #5541 from RoosterDragon/enumerate-armaments-once

Avoid repeated work in AttackBase.
Merge pull request #5509 from RoosterDragon/stream-exts-fixes

Fixes to StreamExts.
Merge pull request #5400 from RoosterDragon/equatable

Implemented IEquatable<T>
Merge pull request #5508 from pavlos256/read-only-list

Add IReadOnlyList
Merge pull request #5405 from RoosterDragon/min-max

Added MinBy, MaxBy, etc.
Merge pull request #5504 from RoosterDragon/frozen-fog-lookup-locals

Cache some dictionary lookups
Merge pull request #5567 from ScottNZ/perf

Refactor AutoTarget scan and GPS interaction
Merge pull request #5539 from deniz1a/repair-pause

Closes #5322
Merge pull request #5564 from Kanar/MinibibsRework

Adds/reworks some minibibs
Adding SDL2 window grab on loading the game. Made this behaviour configurable in the 'Input' tab of the Settings menu

Updated settings file for TD to expose the new 'Lock mouse to window' display configuration option

A text label notes that modifying the 'Lock mouse' check box requires a restart