The decision is a victory for development groups that opposed the limits and a setback to other Massachusetts towns interested in implementing similar restrictions.