Kim Yong Nam, North Korea's former ceremonial head of state and a lifelong supporter of the ruling dynasty, has died aged 97, according to state media.