runqueue: Fix setscene tasks not running

Currently, if you have hard dependencies between setscene tasks (like avahi on
base-passwd through useradd.bbclass), other dependencies may not be installed
even if these exist in sstate. For example, avahi -> expat -> pigz-native
(and avahi -> base-passwd) yet if you cleansstate base-passwd:

bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate
bitbake avahi | tee

you will currently see pigz-native being rebuilt even though it was in
sstate. The fix for this is to continue to iterate dependency chains
around hard blocked dependencies as per this patch.

After this patch is applied, you will see pigz-native installed from sstate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2/hg: Fix username/password handling

We should only add user/password options if they're specified as in the
fetch case. Patch from Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
utils: Improve profile log processing

This stream redirection of stdout is horrible. pstats takes a stream argument
so lets use that instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake-worker: Extra profiling data dump

Currently we get no profiling oversight into either the main bitbake worker
process, or the overall parsing before task execution. This adds in extra
profiling hooks so we can truly capture all parts of bitbake's execution
into the profile data.

To do this we modify the 'magic' value passed to bitbake-worker to trigger
the profiling, before the configuration data is sent over to the worker.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
build/data: Write out more complete python run files

Currently the output in the python task/function run files is rather
incomplete and effectively useless. This enhances the code to take
advantage of the bitbake's dependency tracking and extend the output to
include dependencies. This makes the files more usable for debugging
purposes. Since this only happens at python function execution time, the
overhead is minimal in the grand scheme of things.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>