media: do not send invite response prematurely
Previous code relied on assumption that on incoming call, local codecs
will be prepared before user starts the call by pressing 'Accept' button,
which is not always true. In such situation list of all available codecs
was sent in invite response, including those unsupported by remote
side. Call was then aborted because of unsupported media.
Let client send invite response only after both conditions are met -
codecs prepared and call accepted by user, regardless which of the
events comes first.
New code uncovered that PurpleMedia should not be unreferenced
in sipe_backend_media_free() as purple does this internally in
purple_media_end() function which is also called on call hangup.