I think I figured it out. There is an item in System Preferences for MobileMe (under the Internet & Wireless heading). I went there and "signed out" of MobileMe in that setting. (Let it remain in a "signed out" state - i.e., don't sign back in to it with either the old or new "MobileMe" password.)
Then I went into Mail Preferences and (re)set my new AppleID password in the iCloud account's settings (it was being blanked out before this). Now my Mac Mail is working better. Sometimes it still asks me to enter my password, but not always (very odd, that!). But when it does ask, and I give it the password, it only does it once and Mail does get my iCloud mail.