Meta may trim up to one-fifth of staff while accelerating massive AI investments to boost efficiency and long-term competitiveness.