Bio-Inspired Distributed Constrained Optimization Technique and its Application in Dynamic Thermal Management