Media: Pass thumbnail and medium sizes to image_constrain_size_for_editor() to force constraints based on the current DB options for those sizes. History: see #22598, #22738.

props jond3r
fixes #23102
for 3.5


git-svn-id: https://core.svn.wordpress.org/branches/3.5@23282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Don't unnecessarily re-render the attachment details view when editing the title and caption. Re-rendering causes issues with tabbing and focus, and is only necessary for other views (such as "Caption this image..." when editing a gallery).

Merges [23283] to the 3.5 branch.

props koopersmith.
fixes #23054.



git-svn-id: https://core.svn.wordpress.org/branches/3.5@23284 1a063a9b-81f0-0310-95a4-ce76da25c4cd