SES-1669 SES-1670 : Add QueryResultWriter interface

In order to handle stylesheet and link elements, both BooleanQueryResultWriter and TupleQueryResultWriter need to know when the document starts and when the header starts and ends.

Together with those events, there is an equivalent event for end document.
SES-535 : Add JSON format constant to BooleanQueryResultFormat
SES-1669 : Implement support for link and stylesheets for JSON

Stylesheets are ignored, while links are added as an array
SES-1669 : Implement support for links and stylesheets for SPARQL XML

Stylesheets are added after the xml element and before the sparql element

Links are added together, and should therefore all be after the bindings names, as required by the format, however, this distinction is not required, as the binding names may be empty in a valid results document.
SES-535 : Implement support for SPARQL Boolean JSON Writer
SES-1669 : Move Binary format header writing to startDocument

Add stubs for other methods that are not relevant to the Binary query result writer
SES-1669 : Add stubs for new methods in boolean, csv and tsv writers
SES-1669 : Fix BinaryQueryResultWriter for TupleQueryResultHandler

startDocument was not being called
SES-1669 : Ensure that calls through the TupleQueryResultHandler will still start the document and start the header section before startQueryResult

Removed endDocument from the interface as it is not compatible with TupleQueryResultHandler. Its functionality is in endQueryResult for TupleQueryResultHandler and write for BooleanQueryResultWriter
SES-1669 : Cleanup public method declaractions in interfaces
SES-1669 : Add @since annotations to QueryResultWriter
SES-1669 : Fix javadoc for new writeStylesheet method in XMLWriter
SES-1669 : Reset documentStarted boolean in BinaryQueryResultWriter
SES-1714 : Add boolean helper methods to QueryResultIO
SES-1713 : Move queryresultio tests to compliance and testsuite modules
SES-1669 : Split up the boolean and results writer interface methods

The results writer interface requires that
TupleQueryResultHandlerException be thrown, while the boolean interface
requires that IOException be thrown. There is no easy way to fix this
without redesigning the entire boolean/results architecture, so to work
around it, the two writer interfaces are now separately declared to
enable different exceptions to be thrown from both.

There are still some shared methods in SPARQLJSONWriterBase and
SPARQLXMLWriterBase but they are not from the interfaces, and are mostly
not public
SES-1714 : Mark methods as introduced in 2.8.0 not 2.7.0
SES-1716 : Add superclasses for boolean and tuple query handlers
SES-1716 : Convert TupleQueryResultHandlerException to new superclass

This makes it possible to abstract the main QueryResultWriter methods
back up from TupleQueryResultWriter and BooleanQueryResultWriter
SES-1669 : Push tuple and boolean handling methods up to new
QueryResultHandler interface

This enables the removal of the previous generics arguments that were
used to distinguish between the two heirarchies. The new methods all now
throw QueryResultHandlerException.

For backwards compatibility, the old TupleQueryResultHandler methods
still throw TupleQueryResultHandlerException. As code is migrated to use
the new QueryResultWriter methods, it will be necessary for people to
start catching QueryResultHandlerException, and it should only be a
simple replace in catch and throws to move up to it, but it would be too
much of an issue for backwards compatibility at this point.

Existing implementations of TupleQueryResultWriter and
BooleanQueryResultWriter will now need to decide whether they can handle
the boolean or tuple methods, respectively, or whether they will throw
UnsupportedOperationException. By default all of the queryresultio-*
methods throw UnsupportedOperationException in these cases.