[#1535] Fix resolving chained deferreds.


Problem description
===================

In case a callback from a chained deferred returns another deferred, _runDeferred does not wait for it to finish.


Why we got into this (5 whys)
=============================

* There was no tests for this use case.


Changes description
===================

For now, this branch is just a quick and dirty fix.


How to try and test the changes
===============================

reviewers @alibotean 

Use this version in a separate project with problems. version 0.16.0 was released.