[Solid] Port foreach to range/index for
Unit tests still pass. I had to hack CMakeLists to ensure HAL stuff are still buildable.