write: more progress on the AMF0 write() function

Adds Boolean, String, and ECMA Object type support.