Fix a few cpu time leaks in request broker and HTTP, also add a global sleep function
(and why did HTTP.c have it's own copy of mystrdup anyway)