Add llvm::hexDigitValue to convert single characters to hex.

This is duplicated in a couple places in the codebase. Adopt this in APFloat.