merge file close fix from RC_0_16
improve connection tester a bit, to deal with being unchoked
fix missing include
generalize command line parsing of connection_tester and add feature to serve corrupt pieces every now and then
make_shared include
merged changes from trunk
fix test-corruption on connection_tester
fix issue where fence jobs could get stuck forever
mostly comments updates
improve stats counters for piece picker to expose performance issues
add some more peer flags
clean up stats colelction about piece picker invocations
optimize end-game piece picking
optimize piece picker further by categorizing zero-priority partial pieces separately