Oracle is cutting staff as the company seeks to curb cost while it invest in AI infrastructure.