Fixed media_gallery update hook.  #2115

Looks like the media_gallery field that was changed had been reverted at some point on projects.  This means that the new db table for that field exists, so my update script was bailing out.  Made a little change - when the table already exists, we delete it if it's empty and let my earlier version of the hook recreate it.
Merge pull request #2116 from openscholar/2115

Fixed media_gallery update hook.  #2115