Update $.js to include the optional delegate.

There's a few interesting ideas in this.
- Conditionally append, so it wouldn't overwrite $.
- Check which "matches" method is available, if any?
- Appends a simple "matches" if none exists.
- Reduction of document references.