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"/>
Fixed SST timer being reset to the lowest value on session refresh.
Trigger exactly one callback per early state change.

There are several reasons behind this change:
1) Other callbacks are only triggered once for each state change.
2) SNOM phones send several 180 Ringing messages in a row. That triggers
several early dialog callbacks, which in turn trigger several PUBLISH
and NOTIFY through the pua_dialoginfo module. This can potentially lead
to problems.
Removed useless SST timer reset.

It could potentially reset the dialog lifetime to its max value when it
is not required.
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.
spec file for el/fedora synced with build server
fix init script for el to run opensips as user opensips
Merge pull request #23 from dsandras/ds-sst-morefixes

Fixed SST timer being reset to the lowest value on session refresh.
Credits go to Damien Sandras from Be IP s.a. @ http://www.beip.be
Merge pull request #24 from dsandras/ds-dialog-cb-early-once

Trigger exactly one callback per early state change.
Credits go to Damien Sandras from Be IP s.a. @ http://www.beip.be
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
PUBLISH requests are now handled in the same order than received.

That is specifically useful for pua dialoginfo which was generating dialog
info notifications that were handled in the wrong order with that patch.
PUBLISH with older documents were sometimes treated after PUBLISH requests
with newer documents, leading to incoherent states.
The correct document version number is now set in the NOTIFY requests.

There was a locking bug leading to NOTIFY being issued with the same
version number.
Added documentation for recent changes.
Fixed goes_to_gw and is_from_gw so that they accept negative
gateway types ( to match all gw types)
Fixed comparison wrt last changes.
Improved debugging message to make it more useful.
Cleanup menucnfig files when doing make proper
(cherry picked from commit 4d4d3dbefc084db00c122e499b9299240ed6e0d5)
parallel compilation

speedup compilation on multicore/multicpu machines(cherry picked from commit 33134feaa38a9fb376dea97eb7711cdd5aced758)