Computation in population protocols: exact majority, uniform computation, and the dynamic model