Database version 14: Add config_list for tup.config changes.

Previously, there was a unique directory node, VAR_DT, which had a tupid of 2. Various parts of the code would know to check for or ignore this particular value, since its presence in the create_list meant that we had to reparse the tup.config file for new @-variable changes. With variants, we would like to potentially have multiple tup.config files, each with their own @-variable namespace. As such, we only want to parse a particular tup.config file if it has changed, which we can't discern from a single tupid value of 2. Instead, each tup.config can be treated as a virtual directory with @-variables as children, and the tup.config file's tupid can be put into the new config_list that comprises the first phase of processing. After this, all create_list nodes can be parsed, and then all modify_list nodes can be executed.

Additionally, the node table is modified to have a srcid value. This will be used to point from variant directories to the corresponding directory in the src tree.
Added t8004, t8005 - tests for variants.

Variants currently function by creating a top-level subdirectory with a tup.config in it. The src directory tree is then duplicated here, and all new sub-directories get their own tup_entrys and are parse-able. The "default" variant, which is the standard in-tree one, is disabled if other variants are used. Otherwise when a variant overlays the src file-system into its variant tree, it will see the generated files from the in-tree variant and get confused.
Added t8006 - make sure we can parse a variant with a ghost.

If a variant tries to read from 'foo.h', then we can get a ghost in build/foo.h even if we end up reading foo.h from the src tree. In this case, we need to still be able to parse the Tupfile when our input is found as a ghost in the variant.
Added t8007 - Use a vardb per variant rather than atvardb.

With a single atvardb, separate variants would stomp over each other in the same namespace. Each variant needs its on @-variable namespace.
Added t8008 - make sure we can rm -rf a variant.
Fix t8007 - make sure we don't duplicate the variant dirs themselves.

If we have two variants, we shouldn't see the one variant's directory structure inside the other.
Added t8009 - make sure new variants are added to create_list.
Added t8010 - new sub-directories get added to variants.
Added t8011 - make sure variants only work at the top-level.

This way you can check in variants in your project under various build-* directories (or whatever, as along as they contain a tup.config). Then if you run 'tup init' within the project, you'll get the variants. If you run 'tup init' above the project, you'll just get a default in-tree build (unless you have other variants there).
Added t8012 - ghost variant directory.

In this case we end up with a ghost directory in the variant tree. If this later becomes a real directory in the source tree, we need to convert the variant directory from a ghost to a TUP_NODE_DIR.
Added t8013 - don't duplicate file operations on in-tree builds.

We only want to do the overlay for a variant. For a normal in-tree build, just do a single operation. The root variant now uses a NULL variant_dir in the file_info structure so the fuse fs knows not to do those overlay operations.
Added t9005 - have a vardict file for each variant.

Now each variant gets a .tup/vardict-<name> file for it, and the master_fork server gets info about which file to pass to the sub-process.
Added t8014, t8015 - can't use files cross variants.

Since variants are optional, it doesn't make sense to try to use a file from one variant in another. The check for this is done in both the parser stage (so errors can be given more quickly) and when input files are checked (in case the file isn't mentioned in the Tupfile).
Added t8016 - go from in-tree to a variant.

I was trying to rely on the fact that calling the parser with a disabled variant would clear out the in-tree build when switching from in-tree to variants, but unfortunately the in-tree build files are not removed until after all Tupfiles are parsed. This means a variant Tupfile could be parsed and see generated files from the in-tree build.

The fix here is to detect when the in-tree build is going away, and wipe it out before doing any parsing. This unfortunately requires going through the whole database, but is necessary to ensure that the in-tree build does not affect the variant.
Added t8017 - go from a variant to an in-tree build.
Move variant_list inside variant.c
Added t8018, t8019, t8020 - tests for cleaning variant dirs.

The variant build directories should be cleaned up automatically as Tupfiles are removed in the src directory. This is a little tricky since we have to wait until delete_files() (variants won't be loaded during the scan / monitor stage). Then we check if the directory can be cleaned up with two quick queries.
Update t8016 - make sure subsequent updates work.

If we don't unflag the root variant after clearing out the in-tree build, we will keep trying to remove it, which wipes out the whole variant directory and generally confuses tup.
Remove dead code.
Added t8021 - variant -> in-tree without a tup.config

Even if we don't have a top-level tup.config, if we remove all the variants, it should fallback to an in-tree build. This is done by reparsing all Tupfiles for the in-tree variant. Note that we cheat and know whether or not to re-parse everything by whether or not our ghost in-tree tup.config exists. If it doesn't, it means it's our first update and so we don't have to issue the O(n) db query.