Subharmonic and homoclinic bifurcations in a parametrically forced pendulum