Fix lock errors on startup.

In messages.c, there are several places in the code where we create a
tmp_tech_holder and pass that into an ao2_find call. Unfortunately, we
weren't initializing the rwlock on the tmp_tech_holder, which the hash
function was locking. It's apparently harmless, but still not the best
code.

This patch extracts all that copy/pasted code into two functions,
msg_find_by_tech and msg_find_by_tech_name, which properly initialize
and destroy the rwlock on the tmp_tech_holder.

Review: https://reviewboard.asterisk.org/r/2454/
........

Merged revisions 386006 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@386019 f38db490-d61c-443f-a65b-d21fe96a405b
Allow WebSocket connections on more URL's

This patch adds the concept of ast_websocket_server to
res_http_websocket, allowing WebSocket connections on URL's more more
than /ws.

The existing funcitons for managing the WebSocket subprotocols on /ws
still work, so this patch should be completely backward compatible.

(closes issue ASTERISK-21279)
Review: https://reviewboard.asterisk.org/r/2453/


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@386020 f38db490-d61c-443f-a65b-d21fe96a405b