by Robert Iraggi
Checks every x minutes if WiFi is enabled.
If WiFi is enabled but not connected WiFi will be turned off and auto sync will be disabled.
If WiFi is disabled, WiFi will be turned on and connect if possible, else WiFi will be turned off again.
When WiFi gets connected it will enable and execute auto sync.
When WiFi gets disconnected it will disable auto sync and eventually disable WiFi.