HAS_SIDE_EFFECTS should not compare with strict equality

http://jsfiddle.net/Eh29v/, try typing numbers to the left in the input field and the cursor will reset. This is because `10 !== "10"` obviously isn't true. Simply using regular type-casting equality makes it behave correctly for integer/strings.

I also added some comments explaining non-obvious details of related code.