Mapping: Added macro MD_FULLP(). This is a predicate that indicates whether all keypairs in a struct mapping_data are in use or not. Some related code clean up.