[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.
diff --git a/Misc/NEWS b/Misc/NEWS
index 8b155ed..986ec06 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -96,6 +96,10 @@
 Library
 -------
 
+- Bug #1569790: mailbox.py: Maildir.get_folder() and MH.get_folder()
+  weren't passing the message factory on to newly created Maildir/MH
+  objects.
+
 - Patch #1592250: Add elidge argument to Tkinter.Text.search.
 
 - Patch #838546: Make terminal become controlling in pty.fork()