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)
Fixes realated to previous commit (double siptrace)

(cherry picked from commit d4e81886c41e17fe259ba2ee48d6b2ce3e7eb016)
Merge remote-tracking branch 'upstream/master'