Copy cleanupStylesWhenDeleting patch from TinyMCE 4 for TinyMCE bug #5641

Reference issue spohlenz/tinymce-rails#115

TinyMCE Bug #5641: http://www.tinymce.com/develop/bugtracker_view.php?id=5641