[HELIX-423] Remove election code duplication, fix metrics reset