Mass. justices weigh legality of proposed ‘millionaire tax’