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

Built from https://develop.svn.wordpress.org/trunk@30354


git-svn-id: http://core.svn.wordpress.org/trunk@30353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Allow the response code to be passed as a shorthand to the `$title` or `$args` parameter of `wp_die()`, for brevity.

See #10551 and #11286
Props nacin

Built from https://develop.svn.wordpress.org/trunk@30355


git-svn-id: http://core.svn.wordpress.org/trunk@30354 1a063a9b-81f0-0310-95a4-ce76da25c4cd