proto: Updated state constants.
proto: Added EscapeString().

This function may be used to escape and quote a string suitable for use in a
query.