Add workaround to fix issue 10567

http://d.puremagic.com/issues/show_bug.cgi?id=10567

Currently VariantN does not support const objects comparison. So just add specialized opCmp member and use cast().

Corresponding compiler change: https://github.com/D-Programming-Language/dmd/pull/2321