issue #1501: add Closeable annotation to all top-level apis