Nasdaq notches second-best close ever as tech groups advance