Massachusetts ranked first in the country in student performance on a closely watched national test, and Boston scored near the top among large cities, according to results being released Wednesday. US Education Secretary Arne Duncan held up Massachusetts as an example to the nation, praising 20 years of efforts by Bay State educators to boost performance…