Ferromagnetic hybrid nodal loop and switchable type-I and type-II Weyl fermions in two dimensions