Fixes for the 2 replication problems :
- Missing cn attribute in replication.ldif
- When at least 2 replication servers are used, they will both try to connect to each other.
Since there must be only one connection, one of the connection is rejected.
Unfortunately in some cases the replication server fails to recognize that they are
already connected and keep trying to connect to the other replication server
every second.
The reason while they fail to notice that they are already connected is because
there is a confusion in the code between the IP address and the hostname.
This fix uses the IP address everywhere and also add checks between the IP address
and the local IP address : 127.0.0.1.