[Bug #1569790] mailbox.Maildir.get_folder() loses factory information

Both the Maildir and MH classes had this bug; the patch fixes both classes
and adds a test.

Will backport to 25-maint.
3 files changed