check whether a given attribute has a given value. Use it in nsContentList::NamedItem. Bug 307600, r+sr=jst