[BACKPORT] x509: optimize subject alternative name access
That reads SAN and IAN early on import, significantly reducing
the running time of functions which iterate over the alternative
names of a certificate, e.g., gnutls_x509_crt_check_hostname().
Relates #165
Re-apply this patch for Tizen on top of upstream version 3.3.27.
Previously this patch was backported on top of 3.3.5.
Change-Id: I5987a8b4e6f216609957dc8cea952d77498f1910
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>