Change return type of method connectToAP to bool

Similar to the methods connectSecure and connectOpen, a boolean value indicating success or failure is returned by connectToAP.

Furthermore some additional checks have been added to methods getIPAddress, ping, and getHostByName; they require the device to be connected and the DHCP process to be completed.

Method begin can return immediately if the device is already initialised.
Merge pull request #17 from philippthun/return-type-connectToAP

Change return type of method connectToAP to bool
Use separate timeout for each AP connection attempt.
Merge pull request #20 from damellis/timeout-fix

Use separate timeout for each AP connection attempt.