Factor out canvas parsing algorihtm for CanvasRenderingContext2DSettings from JS::Value. This was only used in one place but needs to be usable from other places too in the future.