Refactoring of the ERS3UploadQueue and ERCloudFilesUploadQueue to share the same implementation and avoid accidental death of the queue thread

The ERS3UploadQueue and ERCloudFilesUploadQueue are clearly duplicated. This commit introduces an abstract queue that handles all the logic to upload files asynchronously to a remote server. The upload process is unchanged. The queue logic was improved to perform all the upload logic (preparation + execution) inside of a try-catch block. This small change makes the queue much more robust by avoiding accidental death of the queue thread when an exception is thrown during the preparation phase.
Improve the way attachments and editing contexts are handled by the attachment queue

Current behavior: the attachment queue shares one editing context for every attachment being uploaded. The attachment is inserted into the queue editing context before being enqueued.

Problem 1: the editing context can become dirty (has inconsistencies that cannot be saved) and no attachment can be saved anymore.

Problem 2: the attachment can become inconsistent between queueing and processing it.

Solution: create a new editing context to upload each attachment in the queue. This solution eliminates the chance of a dirty editing context because the editing context is going to be discarded at the end of each processing cycle. It also reduces considerably the chance of inconsistencies in the attachment since it has to be loaded immediately before performing the upload.
add missing API file
Merge pull request #542 from hprange/fixERAttachmentAsyncQueue

Make the ERAttachmentAsyncQueue more fault tolerant
Fix the compile error with ERAttachmentUploadQueue (closes #545)

The current implementation doesn't require unchecked casts and compiles correctly with JDK 6 and JDK 7.
some missing API files
correct selection on ERXDisplayGroup

Last changes to ERXDisplayGroup resulted in incorrect selection when using batching as in that case _displayedObjects and displayedObjects() give you different data. This patch uses reflection instead of altering the newSelection array for performance reasons.
Merge branch 'refs/heads/upstream_master' into integration_origin