Extremal properties of Zagreb coindices and degree distance of graphs