The chief legal officer of the struggling business-communications software maker 8X8 Inc. is leaving for a new job, the company disclosed Wednesday, the same day it announced the firing of its CEO.