adds convenience method to SolrDocument to access endpoint url without h...

...aving to check it

Fixes an issue where if the `Reference` returns as nil the endpoint method is not called on it (in a show page).

Also checks in JS whether or not that the wmsurl is there.