write: beginnings of a write() function

Only AMF0's Number type is supported so far...

Part of #1.