Fixes Media Credit for 3.9.x

Backported changes made in Largo project to plugin for the sake of those who use this elsewhere. Seems to work fine now with visual mode and no longer seeing any JS errors on 3.9.1.

Also, slight formatting change on Line 188 to remove extra space between caption and credit (div instead of p on the wp-media-credit line) and a conditional line break addition at line 193 if no caption exists to compensate.