Move base58.h implementation code to base58.cpp

Most of the base58 code isn't templated, and certainly doesn't need any inlining for performance. Move most of it to base58.cpp.