Generic: add range-adapter for option parsing.

I want to use it in lld, but while I'm here I'll update LLVM uses.