Adds list_peek_current to struct list.

list_peek_current returns the current element in the iteration, without
advancing to the next element, as list_next_item does.
Use the type enumeration in struct work_queue_file.
Modified cache name of each file to be based on local namespace.
Fixes bug which caused collision between cached files with the same remote name.
Fixed bug in detection of missing files on output transfer.
Changed cache name from internal fileid to buffer checksum.
Merge branch 'work-queue-cache-name' of git://github.com/dthain/cctools into dthain-work-queue-cache-name

Addresses issue #184 by making the cached name based upon the local file name,
with necessary variations for each file type.
Add missing flags for open.
Always shift first argument.
Fixed writing past the end of memory buffer.
The bug manifested itself in file names received with garbage symbol
at the end, causing workflow to fail due to files not found.
Added option flag to debug MPI subsystem
Merge branch 'andreyto-at_mpi_fixes'