Fix Writer to comply with io.Writer interface

The io.Writer interface specifies that Write "returns the number of bytes
written from p (0 <= n <= len(p))" (where p is the []byte passed in).  Writer
does not do that, because it adds the length of any padding it writes to the
return value.  Don't do this anymore, because some parts of the standard
library (specifically bytes.Buffer.WriteTo) don't like it.