[backport] add proper methods to provide timeout from xa resource to underlying transaction implementation, fixes #2569