Oracle is laying off thousands of employees as the database giant pours resources into its AI data center buildout.