Add macro to parse regular expressions from log output.

Consumers can now use the LOG_REGEX command to parse a build's log,
finding the first occurrence of a regular expression and replace it
with the specified value.

This can give the build-name-setter plugin some of the functionality
of its description counterpart. In fact, that plugin was an
inspiration for this feature to some degree.