introduce writeFact and deprecate writeAttr

this replaces
(__ \ “foo”).write(writeAttr[T](attr))
with
writeFact[T](__ \ “foo”, attr)