Change directory pruning to be more efficient with large directories.

When we do 'tup upd large_subdir', rather than pulling in all of the sub-nodes of the directory, we can just look at each node in the PDAG and see if it belongs to one of the requested directories.
Added t4127 - partial updates with generated files in external directories.

Both 'tup upd srcdir' and 'tup upd destdir' should work correctly.
Added t3078 - don't delete groups when a directory is removed.

Instead we should make the directory a ghost, so the group can be cleaned up properly later. Otherwise, extraneous data is left in the group_link table and strange SQL errors start to appear.
Added t4128 - make sure when a generated dir becomes a ghost, it isn't in modify.
Added t4129 - allow groups in generated dirs.

This also means we have to create the group if it is used as an input before the generated directory is created.
Remove execute bit from source files.
Use automatically expanding string for command group expansion.

Every C program needs one!
Split out resource file creation.
Change %<group> to expand inline, .res file to %<group>.res

For some uses, it is much easier to just have %<group> expand inline (eg: gcc %<objs>), so resource files are now written as %<group>.res
Added t3079 - multiple resource files.
Disable t3077 in Windows.
Show the expanded command string if the command fails, or in verbose mode.

It's a bit tricky to show it by default, plus for large groups it may make the display ridiculous. It helps for debugging though if commands are failing, so it is displayed by default if the command fails.
Remove extraneous space in expanded groups.