Removed local restriction for role conf functions

Renamed _configure_master and _configure_slave to configure_master
and configure_slave to make them externally accessible.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
Using random integer to id slaves

Instead of keeping a count of slaves, we're using random integers.
This helps skip the job of counting total slaves on every scaling
request.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>