Fixes IOS-337 Crash and/or hang taking photos on iPad

Taking a photo on the iPad requires dismissing a modal view controller. We were falling through a nested if block and not dismissing the modal in this case.

I also fixed having two popovers at once visible (camera versus album and the album popover), and am generally more conservative here.