camel_imapx_conn_manager_close_connections: Avoid possible deadlock

A deadlock could happen by calling CamelIMAPXServer functions with
the CamelIMAPXConnManager write lock locked, where there was a race
condition between the write lock and the server's queue lock. Closing
all the connections without holding the write lock should avoid
the deadlock.
imapx_register_job: Try reconnect if the server is shutdown/disconnected

There could sometimes bubble "Not authenticated" error up to the UI,
which didn't look nicely and was not necessary, because in the case
of the server being shutdown or disconnected it's easy to reconnect.
The "Not authenticated" error message is still used, only the error
code is different, it tells the caller to reconnect.
[IMAPx] Try to address "Empty cache file" error

This is rather a wild guess. The UI can be filled with the "Empty
cache file" error, which means that the just-downloaded message
from the server had 0-length size. This can happen when the operation
was cancelled by a user in a "correct time", probably, thus let's
try to check for cancelled operation too - just in case.
[IMAPX] Missing folder operation finish call at imapx_search_process_criteria()

Once the server is opened for certain folder it should also claim
the folder operation is over, which was missing here.
[IMAPX] Do not hold queue_lock when calling imapx_server_ref_job()

Holding the queue_lock when calling imapx_server_ref_job() can cause
deadlock when the store has opened more than one connection and each
is searching for a duplicate job, both/all servers holding respective
queue lock prevents in a search of active jobs in them, both waiting
for a release of the queue_lock of the other server.
[l10n] Update Catalan translation
camel_imapx_conn_manager_get_connection: Ensure only connected servers are returned

It could happen, still, that the CamelIMAPXServer is disconnected or shutdown
in the list of connections and it is being returned, which is not
correct, thus better never return such dead connections. Once
the server's state is set to shutdown it is automatically removed
from the list, but here plays a role thread interleaving or something,
which does the remove slightly later than expected.
Bug #728973 - [IMAPX] Recover after store summary version mismatch
NEWS update for 3.12.2 release.
Post-release version bump.
Bug #729546 - [IMAPx] Crash after large message download cancel