polling before read/write

files.cpp:
- added wrapper to poll fd before doing a read/write, effectively making
it non-blocking
- changed print_time_slices to only happen with verbosity 2

parcel.cpp:
- changed check in clean_exit so it'll still wait for threads to exit on
EXIT_FAILURE

receiver.cpp:
- added check_for_exit in receive_files loop

sender.cpp:
- added ability to change read chunk size to see if it has any effect on
performance

udpipe_threads:
- handling 0 byte reads now so it won't quit on that (happens with non-
block)
- changed main while loops in recvdata/senddata to have a status
variable that is set in the loop to allow it to exit without breaks all
over the place
Fixes to exit, threading changes, some debug data

crypto.cpp:
- Moved exit check to end of loop
- Have more cleanup of mutexes

files.cpp/h:
- Added a pipe fifo system that I'm not going to use, however, it might
prove handy later, so I'm leaving it in there

parcel.cpp:
- Changed use of waiting for pipe, init fifo stuff even though it's not
used
- Fixed thread waiting/priority in a few places to avoid thread lock on
exit

receiver.cpp:
- Humbling hack to force acknowlege_complete_xfer to merely sleep on
call, avoiding pipe fifo complexity.
- Moved expecting_data flag to F_SIZE callback
- Some debug output

sender.cpp:
- Disabled chunk read for now, setting back to full size
- Some debug output
- Removed check_write_pipe (superceded by pipe fifo check)

thread_manager.cpp:
- Changed order of thread types to properly have different threads
waiting

udpipe_treads.cpp:
- Use usleep wherever possible
- Added mutex for send/recvdata to have loop not bail when data is in
there
- Better handling of zero byte read/writes to have loop not exit like it
used to

testParcel.py:
- Removed '=' necessary in args
- Changed crypto arg to be a flag instead of a value
memory mode added

.gitignore:
- added a few files

files.cpp:
- made time slice array bigger
- added check for logging so time slice addition doesn't happen if
logging isn't active

parcel.cpp:
- added argument for testing to memory with fifo ("--fifo-test" and
"-f"), default copy size is 2GB

receiver.cpp:
- added state to handle fifo header

sender.cpp:
- added blocks to output fifo type file
Spiffing up usage

parcel.cpp:
- usage improved, still needs work
fixed README

README.md:
- Added new argument description to readme
Fix init bug (again)

crypto.cpp/h:
- Move id_lock init back into constructor (and STAY there)
More debug output

receiver/sender.cpp:
- Added debug output to calls to clean_exit for debugging
More debug

everywhere:
- debug output to find error
Have check not look for 0 bytes

sender.cpp:
- Have read_header only check for error, not 0
Update time slice size

files.cpp:
- make time slice array bigger
Added argument for pipe test copy size

parcel.cpp:
- argument added to adjust how much data is copied for pipe test (-s GB)
- added help in usage

files.cpp:
- removed output when add_time_slice array is full
Switched to new version of udt, kept old version just in case

udt:
- our version, 4.10, was last modified in 2011, the latest version has
way more downloads, and is compatible with the documentation for UDT4 on
sourceforge. For example, many error codes were missing in 4.10 that
were listed in the docs.  I'm not sure what the total changes are, as it
just says "mostly bug fixes since last version".  Whee.
Changing default packet size

parcel.cpp:
- default max packet size changed from 8400 to 1500
Added max packet size as arg,

parcel.cpp/h:
- Added -m as arg to pass max packet size. As is documented in the code,
the default size set (8400) was causing problems in certain cases, so it
was set to the default that UDT uses, which is 1500.  However, there may
be a speed change, so the ability to speed it up was added as a command
line arg.

udpipe_threads.cpp:
- Removed some debug output
- Made a few things safer in recvdata
Merge branch 'non-blocking', removed some debug output

Merge non-blocking into master
- removed debug output that was hanging around in master
- removed timeout times that were added for test in
udpipe_client/server.cpp