based on comments from #2849:
 - add bug link
 - test with a few more random numbers
 - rename `threadCapacity()` to `threadLocalCapacity()`
 - size can't be greater than `maxCapacity` and now we have a unit test to prove it