[Reviewer Andy] Issue564 - ACR/ASChain related crash

Andy

Can you review the fix to issue 564 (and duplicates) - this is the problem we have discussed where we lose references between a proxied transaction and the owning ASChain and this causes crashes in ACR handling in some message flows (most notably non-INVITE transaction timeouts and forked INVITE transactions when performing both originating and terminating services.

I've tested by reproducing in a script and verifying that this crashes without the fix and succeeds with it.  (My first attempt was cancelling an INVITE transaction, which unfortunately doesn't provoke the crash, so I also added a MESSAGE transaction timeout which was a bit fiddlier.)  Note that the MESSAGE script also showed up another minor bug which causes us to forward 100 Trying responses on non-INVITE transactions.  The script at the moment handles the incorrect behaviour, but I'll raise an issue for it and implement the one line fix separately.

Mike
I think it would now work either way, but I wanted to keep it so that there was only one AsChainLink per service context in the UASTransaction as this will be needed for further refactoring in this area (for example, so we can get the ACRs absolutely right in complex service cases).