this domain handler stores masks for each variable so that prepare_visited and prepare_distances are barely more expensive than a memcopy