Bug 1065877: prevent OOMs when editing, picking and sharing large images

(cherry picked from commit 63bc9fa28bf457be57613c55c0c52531e5cb612d)
Hi David：
   The code “var button = $('fullscreen-share-button');” ，I think there is something wrong with it. Element id "fullscreen-share-button" is not matching with any element in Gallery on branch 1.4. It cause error.