Remove dependency of base58 on OpenSSL

As an alternative to #4014, this completely removes the bignum-based base58 code, and replaces it with an implementation that directly operates on vectors of bytes / base58 numbers.