Clear existing extension state.

When parsing ClientHello clear any existing extension state from
SRP login and SRTP profile.

(Imported from upstream's 4f605ccb779e32a770093d687e0554e0bbb137d3)

More state that should be systematically reset across handshakes. Add a reset
on the ServerHello end too since that was missed.

Change-Id: Ibb4549acddfd87caf7b6ff853e2adbfa4b7e7856
Reviewed-on: https://boringssl-review.googlesource.com/2838
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index a420989..799f240 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -1394,6 +1394,7 @@
   CBS extensions;
 
   s->should_ack_sni = 0;
+  s->srtp_profile = NULL;
   s->s3->next_proto_neg_seen = 0;
   s->s3->tmp.certificate_status_expected = 0;
   s->s3->tmp.extended_master_secret = 0;
@@ -1746,10 +1747,10 @@
    * systematically reset on a new handshake; perhaps allocate it fresh each
    * time so it's not even kept around post-handshake. */
   s->s3->next_proto_neg_seen = 0;
-
   s->tlsext_ticket_expected = 0;
   s->s3->tmp.certificate_status_expected = 0;
   s->s3->tmp.extended_master_secret = 0;
+  s->srtp_profile = NULL;
 
   if (s->s3->alpn_selected) {
     OPENSSL_free(s->s3->alpn_selected);