mediawiki.api: Use FormData for POST requests when supported

Prefer using FormData for POST requests with contentType set to
'multipart/form-data'. POST requests tend to contain large
strings, which inflate with escaping. FormData keeps that small
through literals with boundaries instead of heavy escaping.

Also, FormData is needed for file uploads via AJAX.

Change-Id: Ibb652e4740aca0a710c0ad426796d98217753842
Merge "mediawiki.api: Use FormData for POST requests when supported"