traverseNode should be using index looping rather than key looping.
Fix confusion of `.attr('value')` and `.val()` on `<input>`

`.attr('value')` should not use `.val()` on `<input>` specially.
Fixes #939

Adds `testValVsValueAttr` to confirm their relations.
Have `text()` accept a function argument

This is for jQuery compatibility. Makes it work similar to `html()`
and other methods that accept a function in their setter form.
Make `text(value)` assign empty string for `null/undefined`

Previously it would assign a literal string `"null"` for null, which
wasn't very useful.
Merge pull request #960 from hojs/attr-input

`.attr('value')` returns the attribute value instead of `value` property
Shave off a few bytes by avoiding `arguments.length` checks

Closes #350, closes #931
Do not eval SCRIPT tags if parent element is not in the DOM

Closes #969
Cleanup checking whether node is inserted in the DOM
Merge pull request #929 from jameskeane/master

traverseNode should be using index looping rather than key looping.
Merge pull request #2 from madrobby/master

sync