Characterizing diophantine henselian valuation rings and valuation ideals