Simultaneous equilibrium and heteroclinic bifurcation of planar vector fields via the Melnikov integral