Fixed bug with incorrect self identification when using wildcard config.
WIP: repaired test_election unit test.
WIP: repaired test_election unit test.
WIP: more unit test cleanups, also fixed election processing for multi-homed systems.