Revert "Revert "Make network connection change listener actually working""
Revert "Revert "Make network connection change listener actually working""

This reverts commit 51f5b1201bb713243b0cb2e160c18ee17d3a0baf.

It's inappropriate to revert whole commit, the relevant part is much
much much smaller.

tintou/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,tintou/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,tintou/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,tintou/evolution-data-server,Distrotech/evolution-data-server