Towards Swarm Calculus: Universal Properties of Swarm Performance and Collective Decisions