Fix a bug where package masks weren't always interpreted correctly

The eix output of the <unmask> tag was treated as covering both
keywords and hardmasks regardless of which it was for, now both mask
levels are handled independently in the code and we have unit tests
covering the expected results.