Move ThreadProxy template to util.h
remove legacy code
move asynchronous uploading from IoDispatcher to AbstractUploader
documentation of AbstractUploader
remove invalid assertion
adapt FileProcessor unittest
TEST: unit test for ThreadProxy template
make sure the writer thread is properly joined un AbstractUploader
remove TearDown() method (unused)
FIX: memory leak (non-virtual destructor in UploadStreamHandle)
TEST: unit test for AbstractUploader functionality
add worker thread to local uploader
use SynchronizingCounter for AbstractUploader
adapt unit tests of AbstractUploader
TEST: add unit test for basic buffer ordering
clearify callback_t in UploadStreamHandle
FIX: duplicate symbol leading to linker quirks
FIX: minor code smells
FIX: deadlock in local file upload
Merge pull request #328 from reneme/refactor_upload_backend

Refactor Upload Backend

I moved the management of the writer thread from the IoDispatcher to the AbstractUploader. This way, each concrete uploader can (or better must) implement its own 'event loop'. To do that, it simply implements the pure abstract method WorkerThread(). The canonical implementation would be an endless loop, that continuously pops from a job queue using either AcquireNewJob() or TryToAcquireNewJob() (see local_uploader.cc for an example).

Inside this event loop anything can be done, since it runs in its own dedicated thread (managed by AbstractUploader).