addJS, addCSS: filter non-unique scripts

	some calls to addJS, addCSS could occur in cycles. Users of these
	functions assume that equal scripts would not appear in page source
	for multiple times, but this check is done only for file-includes
	and not for inlines.

	This commit is to impement the same logic of unique checking for
	inlines and for file includes.
changelog for commit a0e4df