A top retired general has confessed to taking bribes, becoming the highest-profile figure in China's military to be caught up in President Xi Jinping's war on corruption.