test_nix_pprint: Rename to test_nix_expr.py.

Initially this was only about pretty printing and before I did the first
commit, I actually called the main implementation nix_pprint.py. But
in the end I decided to go for nix_expr.py but didn't rename the test
case.

This now renames the test module and class name appropriately.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
test_nix_pprint: Add and imlement assert_nix().

This method first of all shortens the line length and the main purpose
is to print a multi-line error if the assertion doesn't hold. That way
it's easier to spot what went wrong.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
nix_expr: Add a function to merge node constants.

This adds the enclose_node() function, which is used to merge a prefix
and/or suffix into another node while being agnostic on whether it is a
RawValue or a Container. For the latter we need to also take care of
properly merging the value into the inline_variant of the correspending
Container.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
nix_expr: Support pretty-printing functions.

This adds a new container instance called Function, which takes the
function head as a string value (we don't allow any native Python types
here, just a raw string value) and the body as an arbitrarily nested
Python data type. That should make it possible to pretty-print full
machine configurations.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>