Loading a design raises next_id above the largest feature, component and occurrence id, so a missing or stale value can't hand a new item an id already in use, and duplicate ids are rejected as a damaged design. Id allocation uses checked_add, so an exhausted id space is an error instead of a wrap or a panic.
Part of #1016 (points 1, 2 and 4). nekomario28's #1061 reached the same fix independently; thanks to both.
Co-authored-by: nekomario28 <[email protected]>