Make CSRWLock own the native lock and provide scoped guards for shared,
exclusive, early-unlock, and non-blocking use.
Replace direct SRW lock management throughout the IDD, input driver,
and helper while preserving the existing lock scopes.
Group the IDD sources and Visual Studio filters by subsystem.
Split the device and swap-chain implementations into focused units,
rename the context classes, and reduce header coupling.