Stop returning error strings in From{Base64,Hex}

An enum allows callers to deal with errors in a more reasonable way.
auto merge of #11597 : sfackler/rust/err-enums, r=alexcrichton

An enum allows callers to deal with errors in a more reasonable way.