North Korea's rubber-stamp legislature has formally reappointed leader Kim Jong-un as president of state affairs.