Fix double tracing in trace_dialog().

If user AVPs are set and the trace flas is not, the code was forcing the tracing flag which was producing a duplicate of the trace. Now, the flags status (on/off) is also stored in the dialog (as var) and restore later, for each sequential request.

(cherry picked from commit 24ba3ed467bebc1f029e5c0627225f8d54163143)