presence_dialoginfo: interetate through all 'dialog' nodes of xml document

- PUBLISH request can carry info for many dialogs
- reported and patch by Klaus Feichtinger
modules/utils: http_query now stores result also in case of 4xx replies

- Applied patch by Mikko Lehto.
websocket: Fix crash in websocket module

- Avoid race condition by maintaining a connection reference count
- Fixes FS#406