Fix undefined variable and write unit tests for OC_Principal connector

https://github.com/owncloud/core/commit/76b705602629e8ef6ff19176bcd81d92c9cdcad6 fixes the error in #12681

@schiesbn @derkostka Please test and review.
No. That's a specific WebDAV property. I have no idea what it does and I will not change the behaviour since I don't know what explodes then ;-)

http://www.webdav.org/specs/rfc2518.html#PROPERTY_displayname