Chinese President Xi Jinping warned that efforts to widen divisions with Taiwan would be ?punished by history? in a nationalistic speech to mark the start of his second term.