Check if the network is available

Add method isNetworkAvailable to check if there is networkInfo and if
network is connected
Add permission: ACCESS_NETWORK_STATE