[Common] Avoid GC in DeviceCollection

`DeviceCollection.GetEnumerator()` now returns a struct IEnumerable<T>
directly to avoid boxing.

Additionally, we can now use `DeviceCollection[int]` as a shortcut to
`FromIndex(int)`.
[Mac] Fixed exception in HIDInput.Dispose()

HIDInput.Dispose() would remove elements from a DeviceCollection during
iteration. This results in an exception.

We are now using a plain for-loop instead.