Fix errors reported by scan-build.
Added t2131 - make sure preload works with variables.

We just need to eval() the string sent to preload, so we can use $-variables and the like, similar to run-scripts.
Add slightly better error messages if read() fails.

Just getting a "read: Bad file descriptor" is hard to track down.
windows: Clean up deps files using FILE_FLAG_DELETE_ON_CLOSE.

Apparently explicitly calling unlink() after I've closed all the handles can sometimes cause Windows to complain by returning 'Permission denied'. This is a similar issue to what required the tmpfile() wrapper, and uses a similar solution - open the file with FILE_FLAG_DELETE_ON_CLOSE, and don't explicitly remove it. Windows can then clean up the file when it finally decides all of the file handles are closed.
Add instructions to vim syntax.
Remove debug printf.
Update SQLite 3.7.14.1 -> 3.7.15
Fix misspellings with codespell tool (https://github.com/lucasdemarchi/codespell)
Fix t8063 - don't delete variant dirs when moved with the monitor.

It doesn't make a lot of sense to have different behavior in t8062/t8063 since one just involves the monitor. Also, it can be confusing for a user to try to make a backup of a variant directory by moving it away, and then seeing it get destroyed by the next 'tup upd'. Instead, just disable the variant and make all of the generated files now normal files.

This could also break the monitor, since the updater was removing directories that the monitor was watching. Strangely, I only see it in arch linux, but not ubuntu, fedora, centos, or gentoo.
Update SQLite 3.7.15 -> 3.7.15.1
Added t6067 - don't crash if '%o' is used in the output section.

I was using a dumb flag to check if tup_printf() was printing a command string or not, which was used to determine whether or not we could access onl. Instead, we should just check if onl is NULL since we need to do that anyway to not crash.
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.