start cleaning up error handling in the api module

If we get an error response back from the MediaWiki API, we now turn
that into an NSError with custom properties and send it to the promise's
"fail" handler instead of "success".

Should also detect bad HTTP status codes or invalid JSON, but for
some reason no iOS Cocoa documentation I can find actually *says*
there's a "statusCode" method on NSURLResponse or NSHTTPURLResponse.
Blarf.