stage2: ELF: avoid multiplication for ideal capacity

ideal capacity is now determined by e.g.
x += x / f
rather than
x = x * b / a

This turns a multiplication into an addition, making it less likely to
overflow the integer. This commit also introduces padToIdeal() which
does saturating arithmetic so that no overflow is possible when
calculating ideal capacity.

closes #7830
d5d0619aacAndrew Kelley committed on 1/19/2021, 8:47:51 PMparentd5b0a96
3 files changedLine totals unavailable