s4-ldb: fixed O(n^2) string handling in ldif debug print