openldap: Use 'LDAPMessage *msg' for messages

This frees up the 'result' variable for CURLcode based result codes.
openldap: Prefer use of 'CURLcode result'