Prevent access after free of trace messages
Prevent access after free of trace messages

Add a GetNextSeqNum() function and call it to set the sequence
number in the trace message before calling TraceWrite().

Change-Id: I232e1134f711f534c166c18357986b8d1e692d15
Closes-Bug: #1602899

Juniper/contrail-sandesh,Juniper/contrail-sandesh,Juniper/contrail-sandesh,Juniper/contrail-sandesh