Fixed the meta testcase which had no idea of the new attachments entry
Clarified attachment documentation
Replaced unnecessary call to `setattr` with direct assignment
Removed unnecessary PDF output simplification for empty unicode strings
Refactored `write_compressed_file_object` to a top-level function
Use `write_new_object` where applicable in `_write_compressed_file_object` and check that the object numbers are still in sync
Moved imports to top of file
Avoid using the CWD during PDF tests with attachments relative to the document