parser: Log unique link error messages to the parser output file.

Part of the error message was going directly to stderr, and part was going to the parser log file. Everything should go to one place so the error message is readable.
Don't query for the '$' tup_entry twice.

The tup_db_create_node() function already checks for prior existence, so we don't need to do it explicitly beforehand.
colors: Give TUP_NODE_VAR a color, and use the correct enum.

Using the TUP_NODE_TYPE enum allows the compiler to check that all cases are used. TUP_NODE_VAR was missing, causing print_tup_entry() to add an extra 'm' to the output.
Use TUP_NODE_TYPE enum instead of int type everywhere.

This makes it consistent - everything that uses the 'type' of a node uses the enum for it, not an int sometimes and the enum other times.
Fix tup_db_link_exists to return a proper error code.
Added t3043 - test for <groups>.

Now a command can specify a <group> in its output list, and its outputs will be associated with that group. Other commands can specify <group> in their input list, and any of the generated files associated with the group are acceptable for inputs. Essentially the <group> is used for the sticky ordering, rather than the files themselves. The files still get the actual normal links rather than the groups, so a group is not "modified" and does not automatically update all of the commands that use a group as an input.
Added t3044 - move outputs in a group.
Added t3045 - remove outputs from a group.

If we no longer specify the group in the output list, then the files should be removed from the group, and the command should be re-executed so that any dependencies are checked.
Added t3046, t3047 - removing groups from commands.

We have to keep track of the old outputs and remove them from the group when the group is removed from a command. Also the group is now added to the ghost list for possible pruning on a commit when it is removed as an output. Pruning a group is slightly different than a ghost - here we just check whether there are any input or output links to the group. If there are, the group stays.
Include "<>" characters in group names.

This will help separate them from filenames and directory names, since all the strings go in the same namespace.
Added t3048 - create groups used for inputs.

Just using a group as an input will create a node for it, and if it is removed we do a ghost check just like when a group is used as an output.
Added t3049 - make sure we can remove part of a group.

This test removes commands from a group one at a time to make sure the group sticks around until all of the commands are gone. A new check had to be added to tup_db_delete_links() to make sure that any groups pointed to by the command are removed, since that won't go through the existing oldgroup check. This is potentially somewhat inefficient, since we are selecting over the links twice in add_ghost_links() and add_group_links() before actually removing the links. Perhaps there are better ways of doing that.
Added t3050, t3051 - tests for group ordering.

A <group> in a graph should actually enforce ordering among commands. Currently this is done by expanding a group when we find it in the PDAG. This is potentially ineffecient since a group may link to many commands that we don't actually need to load. These extra commands aren't expanded and executed though, so the output is at least correct.
Added t3052 - force a circular dependency with groups.

This also makes the circular dependency detection dump a dot graph so it is a bit easier to visualize the problem.
Added t3053 - allow paths to groups in other directories.

This will help to make generic groups at the project root, or in an include directory, for example.
Added t8070 - try a group using variants.
Added t3054 - refer to a group with $(TUP_CWD).

Rather than pick the group out from split_input_pattern, we can do it when we go to process the outputs. This allows us to specify a group with a $-variable, which can be set in a top-level Tuprules.tup file.
Try to use groups in a !-macro.

Specifying these is a little odd due to the way the !-macros are parsed. The exact text is saved until the macro is used, so we have to set a PROJ_ROOT $-variable that points to TUP_CWD and use this to get all of the !-macros to refer to the same group.
Don't try to unlink a group.

Now that a command can point to a group in addition to generated files, we only want to try to remove the generated files during unlink_outputs.
Merge branch 'master' into groups