Mr. Mayer, a lawyer and vocal consumer advocate, will be the chief technologist in the agency’s enforcement bureau.