Transfer Apple Mail into Gmail
For the pop3 email accounts (if you've left the mail on the server), have you tried going to Settings > Accounts > Check mail from other accounts (using POP3): Add a POP3 mail account you own?

When I migrated my mail a couple of years ago I set up gmail in the apple mail client using iMAP, and manually dragged things into gmail. A combination of that and adding the POP3 accounts took care of my needs, but I wasn't moving 80,000 emails :)

The post linked below looks like it would work, but it'd require some local server administration, not sure if you're up for that.

http://www.benshoemate.com/2007/11/09/how-to-upload-all-your-old-archived-email-to-gmail-from-outlook-lotus-notes-and-unix-pine/

Obviously, if you went this route you'd have to find an alternative to the mail server since that's windows only

I have no research to back it up, but the rules you may have to be a manual process