Adds 5 seconds to tx timeout on master, removing a thundering herd.
Fixes incorrect synchronization on switch to master

If an instance receives a masterIsAvailable for itself while recovering
 the database, bad things can happen. Adding synchronization on
 xaDataSourceManager solves this.

This is a backport of 870c0625139593d14abf131cad31fcab9c56ce5e