Media Grid: when the modal is open, don't respond to arrow keys when `<textarea>` has focus.

Merges [29777] (and [30378]) to the 4.0 branch.

Props ryelle, adamsilverstein.
Fixes #29725.

Built from https://develop.svn.wordpress.org/branches/4.0@30407


git-svn-id: http://core.svn.wordpress.org/branches/4.0@30402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Don't display Edit links for attachments user cannot edit.

Merges [29723] to the 4.0 branch.

props skaeser.
fixes #29596.

Built from https://develop.svn.wordpress.org/branches/4.0@30408


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