Use new update_value_direct javascript helper

This enables us to drop the code that we duplicated in
update_value_raw_string().