This patch adds an optional Error argument to DataExtractor functions
for string extraction, and makes them behave like other DataExtractor
functions (set the error if extraction fails, don't do anything if the
error is already set).
I have merged the StringRef and c string versions of the functions to
reduce code duplication.
This is the only use of Result; eliminate the var and return StringRef() here.