Implement AA byPair.

Resurrected from https://github.com/D-Programming-Language/druntime/pull/574.