Make base.encode support all 5 types

TEXT is a bit weak as it does not render unprintable characters.  I would rather not reinvent the wheel there but I am not sure about what I can use that has already been written, preferably not by adding another  external dependency.

This PR does add four new optional dependencies (default=yes).  We could rewrite configure.ac to fall back on "not available" rather than emitting an error.

New dependencies: jansson, libyaml, msgpack-c, libxml2.