Fix invalid output for golang < go-1.4

Due to the way golang implemented base64-encoding in versions
prior to Golang-1.4, gosgp produced incorrect output. Commit
'89b73528296c1...' cuts down the need for additional buffers
under the assumption that the base64-Encoder calculates the
output bits completely before storing anything. This was not
the case for Golang-1.3.x. It is the case for Golang-1.4 (which
uses local variables instead of pieces of the destination
buffer).

Since the algorithm depends on a certain behavior of the
base64-Encoder which can not be enforced in the standard library
I decided to reimplement the base64-encoding.
Merge pull request #5 from mgumz/master

Fix invalid output for golang < go-1.4