renaming 'director' to 'primary_replica'
changing 'primary' to 'primary replica' where appropriate
changing 'secondary' to 'secondary replica' where appropriate
changing 'master' to 'primary replica' where appropriate
fixing code review comments in renaming director/master