VIVO-773 clean up some of the queries used in building the search index

The new JENA libraries won't allow a clause of the form (str(?result) as ?result), since the variable "result" is already bound.