issue 13410 -- Performance problem with associative array byKey/byValue

Caches first non-null bucket for further lookups. Only calculates cache when byKey or byValue is requested. Based on patch from bug report by ketmar.

Fixes: https://issues.dlang.org/show_bug.cgi?id=13410
Why only updating the cache in aaRange and not here.
Simply factor this out into a helper function.

```d
Entry*[] getBuckets()
{
    foreach (i; firstUsed .. buckets.length)
        if (buckets[i]) return buckets[firstUsed = i .. $];
    return buckets[firstUsed = $ .. $];
}
```