How did imperialism contribute to unity and to the growth of nationalism in India?