JSONQueryBuilder must only write defined query options (sort, comment, …)

Fix mongodb error "bad hint (code = 10113)" with null hint