Canvas2D: Remove command chaining support
Don't return Context2D object from methods and that way allow chaining
them. Reasons for this change:
- HTML canvas 2d context doesn't support this. There these methods
also don't return anything.
- This doesn't seem to be documented in Quick Canvas (other than API
docs return parameters) and not used in examples, so Quick Canvas
users probably don't use it.
- This behavior makes path2d differ from canvas2d as with path2d all
these methods are just "Q_INVOKABLE void".
- There is some performance overhead in returning the object while it
isn't actually ever used.
Also unify the scoping of QCanvasJSContext2D.
Pick-to: 6.12
Task-number: QTBUG-147387
Change-Id: I71c82764623758c3dd04b15efe63aae053886b22
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>