add Base64OutputStream to android-common

Base64OutputStream is a FilterOutputStream that can encode or decode
base-64 data (with any of the flags supported by the Base64 class --
crlf, padding vs not, line wrapping vs not, etc.)

We change Base64 to have package-private decodeInternal and
encodeInternal methods that save all their state in objects and can be
called multiple times to stream data.  The existing functions for
in-memory encoding/decoding call the internal method once; the output
stream calls it multiple times.

Change-Id: Iac661d05329bc2e6b2863088efcedc974415ec44
3 files changed