Court throws out COAH affordable housing plan