utils: work around opal bug
immediate: implement Promise.defer
http/headers: add #clear