The stable Kozai state for asteroids and comets with arbitrary semimajor axis and inclination