feature_config: insure featuregroups and applicationmaps are initialized

If the features.conf is missing, the cfg->featurgroups
and cfg->applicationmaps is not initialized, resulting
in assert on ao2_find of a null container.  This patch
changes the initialization call and adds asserts for a
safeguard.

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

Merged revisions 418886 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@418961 f38db490-d61c-443f-a65b-d21fe96a405b
media formats: fix ref leak of peer for mwi subscription

Holding a reference to the peer during mwi subscriptions
resulted in a circular reference because the final event
message would not be sent until destruction of the peer.

Instead, pass the name of the peer to the event callback
so that it can fail gracefully after the peer has gone.

ASTERISK-23959
Review: https://reviewboard.asterisk.org/r/3754/
........

Merged revisions 418636 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@418962 f38db490-d61c-443f-a65b-d21fe96a405b
astobj2: assert on invalid ref and backtrace cleanup

If a reference count goes negative, instead of
just logging that fact, be more helpful with a
backtrace and an assert that will DO_CRASH.

This patch also removes the duplicate ao2_bt()
function and cleans up extraneous usage of the
ast_log_backtrace() call.

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



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