DIP29: make dup functions pure

This adds attributes pure, nothrow, and @trusted to the .dup internal function.

It also allows for better unique detection on the arguments to adDup(). For example, `adDup(null)` should be implicitly convertible.