## Link to GitHub Issue or related Pull Request, if one exists
Regressed by #793
## Description of change
Due to lock inversion, when binding an analog axis as a button, spice
deadlocks. Fix that.
Also create a separate `unordered_map` that keeps track of device
handles so that `WM_INPUT` handle can look up devices without having to
acquire the larger `devices_mutex` which could be held by (potentially)
lengthy operations like hotplug.
Fix more synchronization issues around hotplug. Latent bug exposed by
MIDI 2.0 issues.
## Testing