PJSIP: Fix crash introduced in r411671

The test event introduced in revision 411671 uses a dangling pointer to
access information about pubsub state changes. This moves the event to
within the lifetime of the pointer.
........

Merged revisions 411790 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@411791 f38db490-d61c-443f-a65b-d21fe96a405b