qapi: Fix string-input-visitor to reject NaN and infinities