Add optional documentation to defrule and defquery.