Reverts and correct "tdf#88230: Cleanup solar mutex yielding"
Reverts and correct "tdf#88230: Cleanup solar mutex yielding"

This reverts commit b15b97ee6b21be18d4ba5df396d39b6d3dab57e1. This
commit directly used SolarMutexReleaser class which releases the solar
mutex first and then acquires the mutex after the destruction of the
object. This is not the correct way of replacing the pre-existing code
where mutex needs to be acquired first and then released.

Additionally, this commit adds a correct replacement for pre-existing
code too.

Change-Id: I79aff608d94ed2d4736679a691b8c18f8a23c581
Reviewed-on: https://gerrit.libreoffice.org/14981
Reviewed-by: Noel Grandin <43cf663cd6d200b6fda42cd74c2a9550f05ea5d0@gmail.com>
Tested-by: Noel Grandin <43cf663cd6d200b6fda42cd74c2a9550f05ea5d0@gmail.com>

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core