base/json: add Contains helper function for checking if an object contains a key without looking it up and then assert failing or creating it.