ssl-proxies: Performance and bug fixes in principal conversion utilities

The CertificateUtil class provides utilities for converting between
Globus DN notation and other string representations.

This patch fixes an O(n^2) problem in toGlobusId() caused by repeatedly
prepending a string to a StringBuffer, thus causing a growing string
to be copied internally.

The patch optimizes toPrincipal() by avoiding the rather expensive
LinkedList and replacing it with an ArrayDeque preallocated to the
correct size.

The patch also replaces the use of StringBuffer with the more efficient
StringBuilder class.

The patch fixes a bug in toPrincipal() in which white space around a
slash appearing inside an attribute value was stripped.

The patch adds unit tests for all three methods.