Generalize Promise a little.

They can still be about a piece of code, but it's now also possible to
create an empty promise, which can either be kept or broken from the
outside. Needs some extra error handling/safety work, but seems to do
about the right thing.
Fix off-by-one in threadpool growth handling.