Add safe multithreading (and support for DELETE and PUT)

The changes to PromiseKit.m included here add thread safety code to promises to avoid crashing that could happen without this.

This PR also includes changes to NSURLConnection to add DELETE and PUT support (depending on same support added to OMGHTTPURLRQ code). I'd have done these as separate pull requests, but I couldn't seem to separate them in the GitHub web UI, so feel free to omit the URL changes.