President Xi has outlined his vision of “a shared future” during a visit that has brought China and Serbia even closer together.