Retrieve group in TableI.close() #11697

* Fix a log statement that was dereferencing a null OriginalFile hash resulting in an exception.
* Retrieve the group ID if the OriginalFile given to `openTable` was unloaded.
* Also a minor cleanup- don't `close()` if it's already been called.

Testing: The following should not result in `WARN`/`ERROR`/exceptions in `Blitz-0.log` and `Tables-0.log`:
Open and close a table with a loaded OriginalFile:
`t=res.openTable(qs.get('omero.model.OriginalFileI', id))`,`t.close()`
Same for unloaded:
`t=res.openTable(omero.model.OriginalFileI(id))`,`t.close()`

Repeat this for a file/table in a different group:
`t=res.openTable(..., {'omero.group':'other_gid'})`

See http://trac.openmicroscopy.org.uk/ome/ticket/11697