DevTools: [CanvasProfiler] Get valueOf() primitive values instead of wrapper objects when saving the replay log.

Some frameworks use Object wrappers with overridden valueOf method for primitive enum values, like this:

var obj = { name: "TEXTURE_2D", value: 0x0DE1,  valueOf: function() { return this.value; } };

When saving the WebGL calls log, just save the primitive values.

BUG=320474
R=pfeldman

Review URL: https://codereview.chromium.org/68273003

git-svn-id: svn://svn.chromium.org/blink/trunk@162380 bbb929c8-8fbe-4397-9dbb-9b2b20218538