Update nest.class.php

Adjusted code to not die but to throw a runtime exception on all errors so that this works to capture errors

try {
    $nest = new Nest();
    $infos = $nest->getDeviceInfo();
} catch (RuntimeException $ex) {
    if ($ex->getCode() != NESTAPI_ERROR_EMPTY_RESPONSE && $ex->getCode() != NESTAPI_ERROR_NOT_JSON_RESPONSE) {
        echo $ex->getMessage();
    }
}