Implement cnd writer

tests are in https://github.com/phpcr/phpcr-api-tests/pull/91