Add support for __toHtml() and __toXml() to AnnotatedRestService; if returned object contains those methods, they will be used to convert response to HTML or XML