Implement MasterElection

We have nothing about setting the timeout on the HTTP request... I'm not quite sure of the relationship between them, but think that ```FLAGS_master_keepalive_interval_second``` should be (at least) equal or greater than the HTTP request timeout? Maybe it should be "a bit greater"?