dismiss modal view on iPad

The iPad requires displaying a UIActivityController inside a popover. When used in this manner, the compose view never leaves the screen when the message is sent or cancel is tapped. This patch fixes that problem.