Bug 863966 - Improve perf of querySelector by caching selector list. r=bz