Make EmbeddedApplication implement Closeable.