Closing the rethinkdb connection and data tempfile when parsing is done.