depth and master_id fields added

depth and master_id fields added
typo fix

typo fix
master_id set by monitor

master_id set by monitor and printed via dprint* routines
getServerByNodeId added

getServerByNodeId added
first implementation for depth of replication

first implementation for depth of replication for nodes
merge from develop

merge from develop
get level 0 for the first master

get level 0 for the first master
master_id, depth, slaves default values

master_id, depth, slaves default values
Merge branch 'develop' into MAX-59
Added replication consistency routines

Added replication consistency routines
Replication consistency with replication tree

Added replication consistency after replication tree computation
Replication tree is now a routine

Replication tree is now a routine
New rules for selecting Master/Slaves

New rules for selecting Master/Slaves are based on MySQL depth in the
replication tree.
The only Master is the root server with SERVER_MASTER bit set
All other servers even with both SLAVE and MASTER bit will be selected
as slaves
Added depth level 0 for each cluster node

Added depth level 0 for each cluster node, this way the algorithm for
root master selection will the same as in mysql replication:

the root master is server at lowest replication depth  with MASTER bit
set

Here for Galera we assume all the servers are at the same level, that’s
0
Merge branch 'develop' into MAX-59
Fixed compile errors

Fixed compile errors
Added documentation to new routines

Added documentation to new routines
Added master_host update in the loop

Added master_host update in the loop, returns the right server in case
of multiple servers with same replication depth
get_root_master routine available

get_root_master routine available
Added new rules for Master selection

Added new rules for Master selection using replication tree