Return ldap result code with error object.
Merge branch 'errorcode' into dev0.8

Conflicts:
	LDAP.js