Land for jackc@codeaurora.com:
Land for jackc@codeaurora.com:

This is a fix for when multiple ethernet services exist (etho0, dummy0, etc). 
The code loops through all available services, and if it is of TYPE_ETHERNET, 
will assign it as the default service to use. If there are multiple 
services of TYPE_ETHERNET, later services in the array will overwrite 
earlier ones. If the last service is something without a real 
connection (such as dummy0), you will not be able to access the internet. 
Also, earlier services are never deleted and will be leaked. 

This change will stop reassigning services once a service is created 
and has a working connection. It will also delete previous connections 
to fix the memory leak. 

This fix was originally implemented http://codereview.chromium.org/3027015/ 
but was removed in http://codereview.chromium.org/4169001/ 

BUG=chromium-os:9766
TEST=Manual. Check to make sure connecting/disconnecting ethernet works as normal.
Review URL: http://codereview.chromium.org/5289007

git-svn-id: http://src.chromium.org/svn/trunk/src@67779 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 449e748a051cfd9c8503717ce089f18f23eb4dde
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser