The problem is that the function called when a timeout happens, always
calls the _all_params_callback which it should not. In fact, there
should be two different timeout handlers instead.
I had introduced unlock calls before calling callbacks in order to
prevent deadlocks. I don't think this is required anymore, as all
callbacks back to the user are now served later from a queue. This does
assume that we don't have any such deadlocks internally though.
This fixes a segfault/abort when using get_all_params(). The issue was
that the timeout handler was not removed as it should have been, and so
after a successful completion, we got another call from the timeout
handler which then satisfies the promise a second time which is not
possible.
This did not show up in the integration test (or at least not often)
because the test was already destructed by the time the timeout would
trigger.