base58: add paranoid return value checks

Rebased-From: 88df548
Merge pull request #679 from rnicoll/1.8.1-dev-base58

base58: add paranoid return value checks