extract incoming mail into gem

fixes CNVS-12182

test plan
- regression test on incoming mail
- use script/process_incoming_emails to manually trigger the processing
  of incoming mail

Change-Id: Iccd74d8fe2b5af3d5eefe25a2736273e3bf559b0
Reviewed-on: https://gerrit.instructure.com/32794
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>