Avoid unnecessary exponential wait computation (#654)

Once an exponential wait exceeds its configured maximum, calculate the
threshold logarithmically and return the cap without constructing an ever
larger integer power. Add a regression test that rejects power evaluation
past the cap.

Fixes #526
3 files changed