China's parliament agreed to a change to the country's constitution that would allow for President Xi Jinping to rule the country indefinitely.