waf: Improve version parsing to avoid failing on warnings
waf uses an inline tar file extracted by the tarfile module. The tarfile
module may print a warning when used with default 'filter' argument[0].
When called to get the version, the first time after unpack, the output
may look like:
# output from lower modules (e.g: warnings from tarfile, ...)
waf X.Y.Z ...
This patch makes the version parsing more precise by looking at the
first line matching "waf ".