res_config_odbc: Fix old and new ast_string_field memory leaks.

The ODBC realtime driver uses ^NN parameter encoding to cope with the
special meaning of the semi-colon. A semi-colon in a field is
interpreted as if the key was supplied twice, something which isn't
otherwise possible with fixed database columns. E.g. allow=alaw;ulaw
is parsed as allow=alaw and allow=ulaw. A literal semi-colon is
rewritten to ^3B when stored in the database.

The module uses a stringfield to efficiently store the encoded
parameters. However, this stringfield wasn't always freed in some
off-nominal cases.

Commit r413241 fixed initialization so the encoding for INSERT and
DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
apparently.) But that commit forgot the frees. This change cleans
that up.

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@414564 f38db490-d61c-443f-a65b-d21fe96a405b
chan_sip: Start session timer at 200, not at INVITE.

Asterisk started counting the session timer at INVITE while the other
end correctly started at 200. This meant that for short session-expiries
(90 seconds) combined with long ringing times (e.g. 30 seconds), asterisk
would wrongly assume that the timer was hit before the other end thought
it was time to send a session refresh. This resulted in prematurely
ended calls.

This changes the session timer to start counting first at 200 like RFC
says it should.

(Also removed a few excess NULL checks that would never hit, because if
they did, asterisk would have crashed already.)

ASTERISK-22551 #close
Reported by: i2045 

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@414620 f38db490-d61c-443f-a65b-d21fe96a405b