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.
Improve buffer library to actually use a buffer.

Before the buffer library just used realloc repeatedly when a string was
appended. This patch makes the buffer library actually maintain a buffer.
Additionally, developers can pass a buffer (on the stack) to use, limit the
maximum size of the buffer, and have the buffer library call fatal on error.
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.
Make buffer_t struct externally visible.

This makes buffer_t allocatable on the stack. This is yet another optimization
to prevent heap allocations for the general case.
Fix bug where buffer was not initialized with empty string.
Cosmetic: Name all sending functions send_something().
Cosmetic: Make arguments of send_file_or_directory consistent with other send functions.
Pull parameters of buffer_init into separate functions.
Add rewind functionality to buffer.