Fix t2124 - node variable should try to access a file outside of tup.

Just using ".." wasn't going quite far enough, so using "../foo.txt" will actually end up setting dt to 0 in get_tent_dt(). We need to check for the 0 return value so we can return an error, rather than call tup_entry_get() on a 0 tupid.
Added t2132 - node variables can't refer to deleted generated nodes.

Similar to other things that handle generated nodes, we have to make sure that when they are in the delete list, they can't be used during parsing. Otherwise an incremental build may behave differently from a full build.
Parser version 7: Disallow node-variables from referring to generated files.

Previously, a node-variable could refer to a generated file like so:

: |> ... |> a.txt
&var = a.txt

However, this becomes more difficult when referring to a generated file in another directory:

&var = ../foo/a.txt

Because we may not have parsed foo/Tupfile yet, so foo/a.txt doesn't exist. This causes the build to behave non-deterministically, which is not acceptable. We can change the node-variable lookup so that it uses input_pattern_to_nl() instead of get_tent_dt(), which would cause it to stop parsing the current Tupfile and parse foo/Tupfile first, similar to input files in :-rules. However, this then breaks t2104 due to a circular dependency among the Tupfiles. Since this test is most similar to how node-variables were intended to be used, it seems the best option is to not allow node-variables to point to generated files.
Added t4078, t4079, t4080, t4081 - files with exit failures.

Sometimes it is useful to move over the valid files that were created by a sub-process even if the sub-process fails. For example, in Latex when it outputs a log file and fails, we don't want to just leave it under .tup/tmp as a random numbered file, but rather put it into the tree in the expected location. These tests cover the various cases, such as when only some of the outputs exist, or we accidentally write a file we're not supposed to (which shouldn't be moved over).
Support Python 3 as well as 2.

Had to fix up the following:

1) print() is now only a function, but using the function in python 2 makes it print an array if you use commas
2) read_byte() returns an int in python 3, instead of a single-character string in python 2, so we have to make it a string in all cases to do the sorting
3) string.join() no longer exists, so use "".join()
Added t3057 - don't add dependencies on group directories.

If we have foo/<group> as an input, we don't actually need to parse foo/ at that time, nor do we need to re-parse the current directory if foo/ changes. The group is created on demand, and the logic to handle the group is done when we check dependencies.
Added t3058 - partial updates shouldn't update the whole group.

In t6055, logic was added to make sure that all output nodes of a command are kept as long as at least one is needed. However, if one of the outputs is a group, we don't want to include all commands pointing to that group. This test checks for the correct behavior when a partial update is used in a group.
Disable t4078 in Windows.

This test sporadically fails because of something to do with exit codes becoming 0 when they shouldn't be (ie: 'false' returns 0 occasionally). It appears to be an issue with Cygwin: http://cygwin.1069669.n5.nabble.com/Intermittent-failures-retrieving-process-exit-codes-td94814.html
Added t8076, t8077 - clean up empty Tupfiles correctly with variants.

Normally when a directory is removed in the src tree, it ends up being a ghost until the generated files and such are cleaned up, so the srcid is still valid for the corresponding variant directory. However, if there is just an empty Tupfile (or one with comments), then when the directory is removed we end up just deleting the node immediately. This means the srcid is now invalid, so later when we try to process the variant dir, we can't find its srcid. One option is to make the ghost check also check for srcid, but since that's not indexed we would have to rev the db. This implementation just sets the srcid to a special value (-2), so when we hit these in the parser we use that as a marker to clean up the variant directory as well.
Merged changes in from gittup tup.
Added node variable support as variable = tup.nodevariable('location').
Any string cast operations (should) resolve to the relative directory of
the indicated location.  Also fixed test cases from merged commits.