Guard against panic in reader and processMessages
Guard against panic in reader and processMessages

Any panic here can bring down the whole server since these functions are executed into separate goroutines.
Recover and log any panic in those two functions.

(Tested by manually injecting random panics into ber.ReadPacket and ber.Packet.Bytes())

b0m0x/ldap,retailnext/ldap,apprenda-kismatic/kubernetes-ldap,phoorichet/ldap,divolgin/ldap,jamesfcarter/ldap