Stability analysis of generalized entropies and q-exponential distributions