Retrieve locales for non-persisted documents

Hacky fix to retrieve locales for not-yet-in-storage documents. Currently if you try `getLocalesFor` on a new and persisted document the UOW will call the session to get the node which will throw a "node not found in workspace" exception.

This PR adds a try catch - but this should not be necessary.

Basically we just need to determine if this document has been loaded by the UOW - but there is no `STATE_*` constant that corresponds to this -- is there a better way to do this today?