Fix setting of Junk and NonJunk flags by markasjunk plugin (#1489285)
Added possibility to register flag mappings by a plugin.