Fix bug 5842.

The bug is caused by rehash producing an AA with a zero-size hashtable
when called on an empty but non-null AA.
reduce condition timeout wait
reduce repetition and sleep time for rwmutex tests
rewrite semaphore tests to reduce test time

- use core.atomic to reduce locking
When AA is empty, rehash should revert it to original state.
Need to call GC.free on old table in AA rehash.
Merge pull request #576 from quickfur/issue5842

Fix bug 5842.
Add forward range capability to AA .byKey and .byValue.
Merge pull request #582 from quickfur/aa_fwdrange

Add forward range capability to AA .byKey and .byValue
Merge pull request #580 from dawgfoto/reduceTestTime

reduce test time