[modules] Const'ify some functions of ModuleMap.