serialization: extract mapGroups from pimpl of DB
Previously, mapGroups were incorporated into PolicySets in pimpl
NaivePolicyDbImpl. But they are in fact not a part of policies.
They are gathered from the system and only filtered through policy data.
This commit extracts mapGroups from pimpl back to NaivePolicyDb,
with some required changes to work with current interfaces, and also with
some not required, but fun changes.
The extraction will allow switching pimpl in the future, keeping the same
groups logic for any pimpl.
Change-Id: I3e1dace93bebb7e19c94cacd7fbf7ceb426d315e