It's fairly clear, from my own analysis and what others write here, that we have a mixture of issues here, some Apple's doing, some not.
a) the primary problem is ill-behaved web content, be that extensions (locally loaded web content (JS and resources), in essence), or remote sites like google, various slide shows, etc. The biggest culprits seem to be slide shows, google docs, and various plugins/extensions, although even with all of the latter removed, the issues still occur, pointing to the fact that any badly written script can suck up ridiculous amounts of resources. It used to be that most scripts were Flash, so Flash used to be the main problem, but JS/HTML5 is no solution to bad or malicious script programming: now the issue has simply shifted.
b) a secondary problem might be, that this third party content triggers some sort of memory/resource leak in Apple's code, but that may or may not be the case, it may simply be a case that these badly written JS scripts on the web pages consume the resources, and there's primarily nothing Apple can do about this, short of reprogramming third party web sites and extensions (which is obviously not going to happen)
c) and that IS APPLE's responsibility: it was advertised how Safari would 'sleep' windows that aren't visible, etc. and that's obviously NOT the case. Even when not a single Safari window is visible (Safari hidden with cmd-h, or on a space without a Safari window), these WebContent processes, instead of ground to a halt with the equivalent of a SIGSTOP, they continue to happily churn CPU, RAM and network resources. Can anyone at Apple tell me why I would want banner ads updated, slide shows going on, and all sorts of other unwanted background processing going on in ANY tab that's not visible?
So if I have a 150 tabs in 20 windows, distributed over 5 out of 6 screen spaces with 4 windows each, then at no point should more than four tabs get any CPU resources at all. All other threads should be absolutely and completely STOPPED: no network traffic, no graphics update, no nothing. Period. And should I be on the one space with no Safari window, Safari and all it's combined web-content processes should consume exactly 0% CPU time.
This is NOT the case, so while Apple can't fix a), they can and should fix b)
There was a time when I could manually send a SIGSTOP to all web processes, and then a SIGCONT to resume, but since OS X 10.10 that doesn't work anymore because it seems to interfere with the woefully inadequately implemented AppNap feature, which if AppNap would work properly, we'd not have this issue in its current severity in the first place.
An additional fix Apple could make, is to add a watchdog to its JavaScript engine and to set low limits on total amount of CPU time any page may use without being MANUALLY being refreshed, or being MANUALLY being put into a white-list that increases the allowable CPU/RAM limits. After the limit has been reached, any scripts associated with the page would then simply be stopped.
Lastly, automatic page refresh should be a disabled/ask by default, i.e. when a user loads a page that wants to auto-refresh any part of itself, the user should be alerted about the fact and be given the options [ask] [allow] [prohibit] and a "remember this choice" checkbox.
Between AppNap, JS-Nap, JS-Limiter-Watchdog, page-refresh-disable, and plug-in-block, these issues could be mitigated, even though the real problem lies to a large part elsewhere, but that doesn't mean Apple couldn't do things to stop nasty code on a glue trap.