core: refactoring the way sets work internally

This is a fully functional and tested commit. So all tests and
acceptance tests (except for 1 AWS resource which I’ll sort before
merging) are executed successfully.

Before this can be merged a migration path for state files needs to be
added so the state is converted to use the new internal representation
of sets (will try to make time to add a separate PR for that shortly).

And maybe it would be nice to add some eye candy on top of this so
displaying a set on screen (in a plan for example) doesn’t show the
internally used hashes but fails back to displaying them with a simple
index (like done now). But that is no requirement for merging this
code, just something that could be improved later on.

Last but not least I will add a few more tests in a separate commit
that will clearly show some situations that are fixed by this change
and so also explain why I started this refactor in the first place
:smiley:
Adding the final tweaks and fixes

Now all tests (both unit and functional) are running successfully.

Only thing to add now is a few tests that show the reason of the
refactor.

And of course a migration flow for the state file. Will try to do that
before the end of the week, so this PR can be merged together with that
coming PR.
Merge pull request #18 from svanharmelen/f-fix/change-set-logic

Fix/change set logic