UTF8-encode psk_identity for transfer
RFC 7925 recommends that DTLS implementations should treat the contents of psk_identity as opaque data whereas TLS originally defined this as UTF8 encoded data and check for correct encoding. To support implementations that treat psk_identity as UTF8, this change encodes access tickets in UTF8 for transfer and decodes upon receipt. For encrypted data, the average growth for this encoding would be 25 % as in average half of the input bytes would be greater than 127 and thus required an additional byte for UTF8-encoding.
Showing with 138 additions and 47 deletions