Add camel_service_queue_task().

Adds a GTask to a queue of waiting tasks with the same source object.
Queued tasks execute one at a time from a separate thread in the order
they were added.

This is primarily intended for use by CamelStore, CamelTransport and
CamelFolder to achieve ordered invocation of synchronous class methods.

This will finally fix Camel's long-standing (mis)use of mutexes as a
dispatch mechanism, which doesn't preserve order and isn't cancellable.
Add CAMEL_CHECK_LOCAL_GERROR.

Same as CAMEL_CHECK_GERROR, but for direct GError pointers.

Example:

    success = class->foo (object, some_data, &local_error);
    CAMEL_CHECK_LOCAL_GERROR (object, foo, success, local_error);
    return success;
CamelStore: Stop using the internal 'folder_lock'.

Use camel_service_queue_task() instead of locking an internal mutex.
This ensures methods are run in the order they were called, and also
makes cancellation of a waiting method immediate instead of blocking
until it acquires the mutex it's competing for.

This requires flip-flopping some synchronous and asynchronous functions,
so that the synchronous function calls its asynchronous counterpart with
help from CamelAsyncClosure.

Removed functions:

  camel_store_lock()
  camel_store_unlock()
CamelTransport: Stop using the internal 'send_lock'.

Use camel_service_queue_task() instead of locking an internal mutex.
This ensures methods are run in the order they were called, and also
makes cancellation of a waiting method immediate instead of blocking
until it acquires the mutex it's competing for.

This requires flip-flopping the synchronous and asynchronous functions,
so that the synchronous function calls its asynchronous counterpart with
help from CamelAsyncClosure.