Moon bears pierced with metal tubes to extract an ingredient used in medicine have been saved from captivity in China.