Fix yaml_fs tests

Signed-off-by: martin f. krafft <madduck@madduck.net>
Simplify yaml_fs merge loop

By merging into an empty Entity, we can simplify the loop.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Add test for merging into empty Entity

Signed-off-by: martin f. krafft <madduck@madduck.net>
Do not use constructors in default arguments

Something like __init__(self, classes=Classes(), …) causes Python to
create a single Classes instance that gets used as default argument
subsequently. If something changes the variable then referenced by
classes, subsequent calls to the default constructor will cause the
changed object to be referenced.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Add test target to Makefile

Signed-off-by: martin f. krafft <madduck@madduck.net>
Refactor mergers

The mergers hierarchy is really left over from testing during the
rewrite. Refactor it all into a single mergers module within datatypes,
where this is used.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Properly handle negater, if not default

Signed-off-by: martin f. krafft <madduck@madduck.net>
Refactor DictMerger by replacing values centrally

DictMerger._replace_value actually does the work now of replacing
non-dict values. In this base form, it just returns new new value.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Provide a CallbackDictMerger

The CallbackDictMerger calls the provided callback function to replace
a value (and possibly do other stuff), thereby overriding the default of
just using the new value. That is to say: the callback must return the
new value.

Signed-off-by: martin f. krafft <madduck@madduck.net>