auth_db: auth_check() to get the auth header from the used api

- this avoids using a different auth header that might be in the request
  before checking usernames in from/to headers against auth user

(cherry picked from commit 4992519eed88d94847d742c52e882082b1b41264)
(cherry picked from commit 9a697d04e7bb041e1ec6748727a418866dc0ba54)
initial commit with kazoo patch
KAZOO-1513 handle mwi subscriptions
KAZOO-2318 fix tcp / tls subscriptions
KAZOO-1513 KAZOO-2318 now working
KAZOO-2318 formatting
removed dbk_pres_update_and_notify
removed dbk_pres_update_and_notify_mwi
change debug lines loglevel to debug
memory adjustments because of tls
reduce the defaults
More updates to memory defaults
KAZOO-2667: since mwi is not transient we dont need to keep it in the hash also reformated the code