CamelDB: Allow nested transactions

There could happen a deadlock when the code tried to do nested transactions,
which might be observed in the ancient migration from mbox to maildir
for local folders sometimes, not talking that the BEGIN/COMMIT cannot be
nested in SQLite, thus this change allows nested transactions. A similar
deadlock could happen when the caller had a write lock on the database
and requested a read lock, which is covered by this change as well.
Bug 486018 - Implement IDNA (Internationalized Domain Names in Applications)
Bug 734853 - CamelNetworkService fails to connect to 'localhost'

A regression after a change for bug 731585.