Backport changeset 4718 from PJProject trunk.

This fixes two bugs:
1) Initial incoming SUBSCRIBE did not set an expiration timeout.
2) Termination of a subscription would not cancel the expiration timeout
   until any pending transactions had cleared.