[cosmos] Prevent trying to index non-arrays
[cosmos] Prevent trying to index non-arrays

The API might give a `null` object or an empty list for a few keys that
are supposed to be arrays. Therefore we need to guard these accesses to
avoid segmentation faults.

The parser functions will leave the values in the target structures
unchanged, probably equal to the default-constructed values.

Typical example
```
curl "https://cosmos.coin-proxy.dev.aws.ledger.fr/distribution/validators/cosmosvaloper1fhr7e04ct0zslmkzqt9smakg3sxrdve6ulclj2" | jq
{
  "height": "2017348",
  "result": {
    "operator_address": "cosmos1fhr7e04ct0zslmkzqt9smakg3sxrdve6etv27e",
    "self_bond_rewards": [
      {
        "denom": "uatom",
        "amount": "14874758.445311305213563000"
      }
    ],
    "val_commission": null
  }
}
```

LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core