CLN: remove uses of compat.lrange, part I
- [ ] xref #25725

This PR starts the removal of ``compat.lrange`` from the code base. This removal requires some attention, as in most cases a plain ``range(...)`` should be used, but in some cases a ``list(range(...))`` needs to be used.

``lrange`` is used quite a lot, so there will be 1 or 2 more PRs, before this is removal is completed.