session: add "terminate and reset" support for protocol stacks