Replace combine and merge_child methods with a single merge_children method.

The previous setup was flawed because it could not correctly handle the
case where an if clause and an else clause both change a value but change
it to the _same_ value. In order to recognize this case we must consider
_all_ of the possible outcomes at once.

This new approach also has the advantage of being simpler in that, from
the perspective of the caller, it combines two steps into one.
Add a library of utilities to make it easier to write unit tests.

The unit tests are getting quite bulky and redundant with mocks, dummies
and reusable helper methods. These common parts are now available in
this reusable library so that we can eventually simplify the tests to
use these, making each individual test script smaller and simpler.
Interpretation and codegen for if statements.