Fix duplicate save and cancel buttons in Studio

STUD-1531

Also add support for refreshing the modal on custom save
Merge pull request #3339 from edx/andya/fix-duplicate-buttons

Fix duplicate save and cancel buttons showing when editing xblocks