Xi Jinping has become the longest-serving president of the People's Republic of China since its founding in 1945 after being elected once again for a third five-year term.