Builds dependent libraries before linking tests.
Allows empty 'roots'.
Renames 'defs' to 'flags' and uses argparse.

This commit drops the custom parsing of the '--<name>.def DEF' parameters, and
replaces them with '--flag NAME:FLAG' instead.  This removes the complexity of
the custom parsing.