Fix `qibuild configure` in some corner cases

We used to only write the dependencies.cmake file only for build
and runtime depends, causing `qibuild configure` to fail when
using testtime dependencies

Change-Id: I62a8dc031709b783395fb46ea67049916d4792ac
Reviewed-on: http://gerrit.aldebaran.lan/46033
Tested-by: gerrit
Reviewed-by: dmerejkowsky <dmerejkowsky@aldebaran-robotics.com>