Generalise to allow serialising from/to any DataInput/DataOutput.

This is a simple patch allowing nippy to serialise to/from any DataInput/DataOutput, not just DataInputStream/DataOutputStream.