SES-1669 : Move handleLinks up to QueryResultHandler

This way links can be persisted without using QueryResultWriter as the
handler. Links are specified in both SPARQL Results JSON and SPARQL
Results XML formats, so they need to be commonly supported in a
workflow.