Avoid creating Exception when tx is null

  * The contract for TransactionManager.getTransaction() states that it should
    return null when there is no transaction. The previous code was catching a
    NullPointerException to return null, which was far more expensive than
    just testing for null.

  * This commit applies 8a3d29e61c4763bd23850a3d912ae338e5a14f58 from the
  develop branch.
BugFix: Use WeakReference to enable GC of deletageTx in JTADelegatingTransaction

  * TxMap holds a static
    Map<WeakReference<javax.transaction.Transaction>>,JTADelegatingTransaction>
    to enable collection of transactions used as keys.  However, because each
    entry's value (JTADelegatingTransaction) is strongly held in the map and,
    in turn, such value held a strong reference to
    javax.transaction.Transaction, the latter was never really collectable.
    This commit fixes this issue by turning the strong reference into a
    WeakReference.

  * This commit applies 03683b2a21c75abcdc7550e77722f1dab7463b05 from the
    develop branch.