Modernize the code to load message and body from DB.

* Don't use unneeded managed cursors
* Put more of the DB work in async
* Don't try to load HTML and plaintext simultaneously
* Explicitly catch & handle exceptions during db ops

Bug # 2087051  (see also bug # 2122960 re unexpected db exceptions)

Change-Id: I446086bc4f3a85b2e766b12d1f7271e61e3ae8d5
1 file changed