Handle the case of unloaded original file (see #10347)

Handle the case when the original file linked to the annotation is not loaded.
see http://trac.openmicroscopy.org.uk/ome/ticket/10347

To test the remaining commits, run

```
./build.py -f components/tools/OmeroJava/build.xml test -DTEST=integration/MetadataServiceTest
```