I just tried it (quit Dropbox and then attempted to reproduce the issue), and I was still able to get a UI hang when closing a YouTube tab.
However, I also realized that I had also come up with a way to shorten the hang time since getting El Capitan. Since I'm in a corporate environment, I'm usually on wired networking when I'm at my desk, but also have wireless turned on (although it's at a lower priority than the wired interface, so traffic goes wired first, if present). When I get a hang, if I unplug the wired network (ethernet dongle on my 2013 retina MacBook Pro), the hang clears relatively quickly. In other words, forcing a network transition seems to have an impact for me.
I also remember somebody posting some logs earlier in the thread which contained TLS-related messages. The suggestion to disable DrobBox, plus the TLS messages, plus the apparent correlation of a network transition with the behavior of the hang, got me to thinking about potential networking interactions being involved in causing this. Usually, when I'm playing YouTube videos, I'm logged into Google (so I see the channels I'm subscribed to, etc). I don't have time to test right now, but I'm wondering if there is also a difference in the UI hang behavior when logged into Google vs. not.