Introduce a custom DOMRefCell<T>

#3050
@jdm should we use `DOMRefCell.borrow_in_layout()` immediately here?