Replace DecodeBase58/EncodeBase58 with direct implementation.

This removes the bignum/OpenSSL dependency.

The base58 transformation code is also moved to a separate .cpp file.
Merge pull request #4048 from sipa/nobigb58

Remove dependency of base58 on OpenSSL