Units in library items start at 1. 0 is reserved for "all units".
Previous code was requesting an out of range index due to an assumption
that units start at 0.
Consider a pin synchronized iff the names and electrical types match in
addition to the position, orientation and demorgan variant.
Also, only modify one matching pin per unit. This prevents
moving/editing a full stack of pins on the same unit when synchonized.
Fixes https://gitlab.com/kicad/code/kicad/issues/2590