Distributed Task Allocation for Multi-Agent Systems: A Submodular Optimization Approach