Moved the compatibility versions of .hasClass() and .removeClass() into the initial declarations

Reduces code and improves performance (the function won't get set twice when the compatibility version is needed).
This also fixes a bug where the initial function was being used in the NodeCollection function even when the compatibility function replaces it (because it was getting set after).