introduce writeFact and deprecate writeAttr

this replaces
```scala
(__ \ "foo").write(writeAttr[T](attr))
```
with
```scala
writeFact[T](__ \ "foo", attr)
```