Electrocoagulation of tar sand and oil shale wastewaters