reorganize state transition in doEndtime and add some notes to some cancels and teardown calls
reorganize state transition in doEndtime and add some notes to some cancels and teardown calls

NORDUnet/opennsa,jab1982/opennsa,jab1982/opennsa,NORDUnet/opennsa,NORDUnet/opennsa