New utility functions and improved hasClass implementation using then, more than 10 times faster. 

Using these new utility functions and implementation of hasClass we can achieve better performance/less cpu usage.

See http://jsperf.com/substring/12