The using the "first available" numbering option, force an
artifical linear numbering scheme starting at '1'.
Start the pad name provider at the 0'th pad index.
Also adds a few related tests and adjusts tests affected by
this change to reflect that the offset still applies.
This can be expanded in future to be more general by skipping
pad (which would allow a custom start and numbering scheme
while still avoiding duplication), but for now,
this does what the UI says and avoids string changes in 5.1rc.
Fixes: lp:1814918
* https://bugs.launchpad.net/kicad/+bug/1814918
Fixes: lp:1814917
* https://bugs.launchpad.net/kicad/+bug/1814917
The current module cannot be queried for existing pads as we
add them (because we never commit, until we finish the whole array).
Instead, pre-gather the names and check as we add, skipping any existing
names.
Note: this will not prevent arrays becoming "mis-ordered", but there
is not a lot we can do to prevent all possible errors.
Fixes: 1808706
* https://bugs.launchpad.net/kicad/+bug/1808706
The same principle could be used to skip existing ref-des'es on PCBs.