Improved PUA DialogInfo.

Several fixes here:
  - Dialog callbacks are now correctly setup after a restart of
    OpenSIPS. In other words, restarting OpenSIPS will not lead to ghost BLFs
    anymore.
  - Added an option allowing not to publish state change in case of reINVITE.
  - Added an option allowing not to publish state change in trying state.
    In other words, a PUBLISH will be sent only when OpenSIPS has received a
    18x response type and not before.
Fixed dialog-info problems in case there is no dialog.

Without that patch, when OpenSIPS does not find any active dialog
and needs to NOTIFY that state, it correctly sends a full state dialog
information, but the XML document is wrong.

This is the wrong format, the one that was used:
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="0" state="partial" entity="sip:752@ds.local.beip.be"><dialog
id="752"><state>terminated</state></dialog></dialog-info>
(info is not partiali but full, dialog id is wrong).

This is the correct format:
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="6" state="full" entity="sip:753@ds.local.beip.be"/>
Removed publish_on_reinvite option.

Disabling PUBLISH on reINVITEs has some side effects when being used
with session timers. More specifically, the session timer could be
refresh, but the PUA PUBLISH could expire because it is not refreshed
at the same time of the dialog when being setup with the initial dialog
lifetime.
Several in-DIALOG PUBLISH fixes.

The number of generated PUBLISH requests is no optimal.

Disabled PUBLISHing for in-dialog REQUESTS. PUBLISHing (again) the
"confirmed" state when handling OPTIONS, ACK, BYE, and other dialog related
requests triggers a mess of useless NOTIFY requests. We only keep PUBLISHing
on reINVITE/UPDATEs as that might be required to be compatible with session
timers (they refresh the PUBLISH lifetime).

Also added a flag to allow inhibiting PUBLISHing for INVITE/UPDATE in-dialog
requests. That might be required for "things" like Asterisk reINVITEs for which
we do not want rePUBLISHing again our "confirmed" state. Especially useful when
you know that Asterisk reINVITEs for INFO, BYE, and so on.
Merge pull request #15 from dsandras/ds-better-pua-dialoginfo

Ds better pua dialoginfo

Thank you for the fixes! Please provide the update on the docs too !

Credits go to Damien Sandras from Be IP s.a. @ http://www.beip.be