idmap2: switch to improved Result class

Remove the old std::optional based Result class, replace uses with the
new std::variant based Result class.

Test: make idmap2_tests
Change-Id: I401cb36e5af06133a2872d835cf29bfb0b106597
17 files changed