Fix encodings in X500PrincipalTest

As said in AttributeValue, DC and emailAddress should be encoded in
IA5String as specified by RFC5280.

Also the canonical encoding of a T61String could be PrintableString when
the string is only 'A' according to b/2102191 but this could be a
mistake.

Consecutive spaces and leading and trailing runs of spaces should be
escaped for RFC 1779.

Also the RFC 2259 doesn't specify anything other than the beginning or
end spaces, but the RI escapes the beginning and ending runs of spaces.

Bug: 12490346
Bug: 12490876
Change-Id: I6591156ba0a27a894241b039570488f89c885242
4 files changed