Replacement for Apple's Reachability re-written in Swift with callbacks