curl: bugfixes and implementation of the *multi* functions