Design Patterns for Self-Organizing Multiagent Systems