Add some specific JSON responses when there are user permission errors for AJAX file uploads. Replace some usage of `wp_json_encode()` with `wp_send_json_*()`.

See #25849
Props gcorne


git-svn-id: https://develop.svn.wordpress.org/trunk@30354 602fd350-edb4-49c9-b593-d223f7449a82