Optimal time and space leader election in population protocols (Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing)