Massachusetts tax collection from July through March outpaced a forecast by $786 million, according to a report by the state Department of Revenue.