Move global_object_for_js_object to global.rs.

This appears to be a more sensible place for it (related to #433).
Regroup uses of JS constants in utils.rs.
Remove unused cx_for_dom_object function.
Merge pull request #3477 from Ms2ger/global

Move global_object_for_js_object to global.rs

Reviewed-by: jdm