Refactor peer communication into broadcast

I only used it in elections for now. I'm going to work on supporting append entries, which I believe shouldn't be much more work.