Make Graph extend AutoCloseable. Fixes #29