Added external references support to pres-rules

This adds support for external references to pres-rules documents
following the OMA specification. In order to achieve this, a few changes
were made in the presence handling:

    - The 'pres_rules_auid' module parameter (in presence_xml) controls
      what mode OpenSIPS operates on: IETF or OMA. Right now this is a
      global setting since the 2 offer different ways for authorization
      and are stored in different XCAP documents.

    - Matching of sub-handling is now done according to the RFC, that
      is, a sub-handling action of block has less priority than that of
      allow. For reference, check RFC5025, section 3.2.1.

Following external references is currently supported only for the
integrated mode.

In order to simplify the implemntation, some common code related to XCAP
handling has been added to the 'xcap' module:

    - A way for normalizing SIP URIs. A SIP URI may appear encoded or
      without the SIP scheme inside an XCAP document. The xcap module
      now provides a function to normalize such URIs.

    - A way for getting XCAP documents from the DB. The xcap module now
      contains a generic function which will fetch any XCAP document
      from the DB.

A TODO file was also added to the xcap module listing future
enhancements to be done to the XCAP related modules.