Dynamic transitions and bifurcations for thermal convection in the superposed free flow and porous media