Bug 992766 - Infer error when recieving NS_ERROR_FAILURE by going through device storage sanity checks, if device storage api is available. r=fabrice