Introduce safe checking whether DOMRefCell<T>.borrow_for_layout() is called from layout task.

This also introduces that checking DOMRefCell<T>'s borrow methods are NOT
called from layout task.