Fixed memory leak in put_directory.
Fixed memory leak in put_input_item.
Cleaned up put_directory to use string_format.
Put task pointer instead of taskid, save some table lookups.
Reordered arguments of put_file/diretory to be consistent with the rest of work_queue.
Reordered arguments for consistency.
Dynamic allocation of remote_name.
Factored send_input_files into send_input_files/put_object.
Factored timing and other elements of put_object to make it much clearer.
Fixed several bugs relating to time, ordering, and consistency in put_object.
Moved common shortcut and debug statement inside of expand_envnames for consistency.
Cleaned up double-free pattern.
Revert "Reordered arguments of put_file/diretory to be consistent with the rest of work_queue."
Somehow, I accidentally managed to undo a recent commit to dag.c.
This reverts commit 79bac4234768894a63236de278a08944d50f9b99.
Free remote name when done.
Fix memory leak when updated arch/os properties.
Cosmetic: Name all sending functions send_something().
Cosmetic: Make arguments of send_file_or_directory consistent with other send functions.
Merge branch 'dthain-work-queue-send-cleanup'

This pull does a general refactoring and cleanup of the work queue file sending
logic, which was getting exceptionally deep and repetitive, and contained
several memory leaks.

Two issues left for later:

1 - Cleanup of receiving files.
2 - Design question about the proper name for cached files.