Role of atomic migration in nanocrystalline stability: Grain size and thin film stress states