Convert some log messages in map_afrom_cp to use the cp not the ci
Modify map_afrom_cs to take a validation callback to verify and fixup maps

This makes the code much easier to follow, removes a bunch of duplicated validation code,
and avoids duplicating map_afrom_cs for any modules that have different validation rules.