Initial work on #647 (closed). Started with this struct because it was the easiest to trace and make sure it still works after the change. Had to do some reading on the
g_atomic_rc_box_* API, so let me know if there is anything wrong in the code.
If all looks good, I'll continue with the rest (most of these structs are in