Efficient algorithms for finding optimal power-of-two policies for production/distribution systems with general joint setup costs