ipatests: Use command -v instead of which in legacy client advice

Part of: https://fedorahosted.org/freeipa/ticket/3833
ipatests: Add integration tests for legacy clients

Part of: https://fedorahosted.org/freeipa/ticket/3833
ipatests: test_trust: use domain name instead of realm for user lookups
Fix debug output in integration test

Recent ipaldap work has made LDAPEntry incompatible with python-ldap's
LDIFWriter.
Convert entry to dict before printing debug output.
Guard import of adtrustinstance for case without trusts

https://fedorahosted.org/freeipa/ticket/4011
Turn LDAPEntry.single_value into a dictionary-like property.

This change makes single_value consistent with the raw property.

https://fedorahosted.org/freeipa/ticket/3521