Convert ssl3_send_channel_id to CBB.

In doing so, simplify the mess around serializing the public key.
Channel ID specifies that you write x and y concatenated. Rather than
using the X9.62 serialization and chopping bits off, get the affine
coordinates and write them out in the same way we write r and s.

Also unify the P-256 sanity check around SSL_set1_tls_channel_id and
actually check the curve NID.

BUG=468889

Change-Id: I228877b736c9722e368d315064ce3ae6893adfc0
Reviewed-on: https://boringssl-review.googlesource.com/6201
Reviewed-by: Adam Langley <alangley@gmail.com>
diff --git a/ssl/internal.h b/ssl/internal.h
index 3c063f5..21fed62 100644
--- a/ssl/internal.h
+++ b/ssl/internal.h
@@ -1116,7 +1116,7 @@
 int ssl3_get_server_key_exchange(SSL *s);
 int ssl3_get_server_certificate(SSL *s);
 int ssl3_send_next_proto(SSL *ssl);
-int ssl3_send_channel_id(SSL *s);
+int ssl3_send_channel_id(SSL *ssl);
 int ssl3_verify_server_cert(SSL *s);
 
 /* some server-only functions */