(CE-87) Fix memory leak in jquery.makeCollapsible

Fixing a memory leak in jquery.makeCollapsible that causes browser
memory to increase on every Ajax refresh of the recent changes. Ajax
refreshing of the RCs is the most popular user JS customisation.

This backports a fix from MediaWiki core for the same issue.
Merge pull request #1301 from Wikia/CE-87

(CE-87) Fix memory leak in jquery.makeCollapsible