fix str_or_none

Method was suppose to return string if input string was non-empty
string. Not empty string.
Simplify code.
Rewrite software/ldap_datastore for TLDAP.

Somehow this was missed in cb722bc3ce1b42b3265284ba31a06c2e0b28b5e0.