Homoclinic and period-doubling bifurcations for damped systems