Call g_mime_shutdown() when we terminate.

  This is part of #101 and ensures that we're nice and clean.