Implement MasterElection

```if (tmp_master.created_index_ < INT_MAX)```, and get rid of ```found```? On one hand, it's more explicit, but on the other, I like it better when there's only one source of truth...