Handle error codes in derived measurement functions

Since `getRawTemperature` and `getRawPressure()` return 0 on failure, the corresponding high-level functions should return `NaN`, rather than processing 0 and emitting a meaningless value.