Resonance frequency and radiative Q-factor of plasmonic and dielectric modes of small objects