bitbake.conf: fix HOSTTOOLS setting related to image testing
A list of tools are added to HOSTTOOLS depending on if we inherit
testimage or not. Unfortunately, if we use TEST_IMAGE variable to
automate the test, these tools are not added to HOSTTOOLS.
Modify the condition to also check TEST_IMAGE to fix the above problem.
Also, change to use if...else... instead of list index for such setting.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>