Fixed crash in GalleryObjectViewController and MediaObjectViewController when selecting an action sheet button

caused by a race condition where the view controllers becomes deallocated before the action sheet has a chance to call its delegate methods on the view controller.