Support commits for user promises

Various support commits, not directly related to, but a result of the work on user promises.

Doing a separate PR in order to avoid these smaller fixes drowning in the huge user promises feature PR.

@cduclos in particular might be interested in this one, since I touch both libutils functionality as well as the testing framework.