Rework how msvcdeps' cached_nodes lock is used so acquiring the lock is
only necessary on a cache miss. Also use a "with" context manager to
simplify management of the lock lifecycle.
This patch corrects an error in the exec_response_command exception
handler which always assumed that the execution's stdout would be bound
to the the WafError exception object.
However, this assumption is only true when the execution completes with
a non-zero status code. For other exceptions, the stdout attribute is
not bound.
Now, when stdout is not available, the WafError msg will be used
instead.
This tool operates similarly to 'gccdeps' by offloading the
flattening of the #include dependency tree to the compiler.
Change-Id: I5e58e8ca838f3d3dc65efa6ce4abf161110632ea
Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>