China’s population is shrinking. It faces a perilous future.