Merge 58149490-fail-non-zero to master

[Completes #58149490]
Correct documentation.

[#58060090]
Document the new scheme

Also allow `..`. and `0..` (without units) in memory range syntax.

Update the tests to reflect the new documentation.

[#58060090]
Allow zero memory size with no unit

[#58060090]
Implement memory ranges

Implement the algorithm in the documentation. Adjust the test results
to reflect the new algorithm.

Allow native memory to have an upper bound. Even though this isn't
particularly useful, there is no need to prohibit it.

Improve stack size handling. If a range of stack sizes is specified
and the floor of the range is non-zero, use the floor as the default
stack size. Otherwise, use the JVM default stack size of 1m. Also,
round the number of tasks and ensure it is at least one to behave
better in edge cases.

[#58060090]
Generalise weightings

The memory weightings no longer need to add up to 1.

[#58060090]
Deal with unbounded ranges properly

[#58060090]
refactor

[#58060090]
Factor stack processing outside balancing loop

[#58060090]
refactor

[#58060090]
Simplify handling of computed memory sizes

[#58060090]
Tidy up usages of zero memory size

[#58060090]
refactor

[#58060090]
refactor

[#58060090]
refactor

[#58060090]
refactor

[#58060090]
refactor

[#58060090]
refactor

[#58060090]