Fix helper to support regex with no type capture

The `extract_messages` helper would fail when given a regex with no
named capture for `type`.

Since not all external tools support the notion of a "type" of message
or even include the type in their output, we should degrade gracefully
if the type is not defined.

Change-Id: Ic0ffb754a5ce19738aa1ff2bd37cd3ae9b5e7528
Reviewed-on: http://gerrit.causes.com/44904
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>