typos and a few semicolons...
Merge pull request #452 from GerHobbelt/patch-typos3

typos and a few semicolons...
cf. commit SHA-1: 310604d4177775257779e7defb8a6eead8c85d3c

- PHP: do not use short tags `<?` as many PHP servers are configured to NOT accept these.

- PHP: do not close the file with a PHP close tag to prevent accidental newlines and whitespace at the end of the file triggering a premature server output write action (part of best PHP coding practices)
2-step to make sure the Gruntfile is case-correct: Gruntfile.js with capital G
step 2 of gruntfile --> Gruntfile rename.
- all the lines `if (parent.nodes === null) return null;` were too happy to use triple equal `===` as parent.nodes = undefined slipped through and caused crashes

- many further triple-equal instead of double-equal tests (JShint)

- the test `typeof a === 'undefined' || a === null' can be written much more concisely and faster as `a == null`: sometimes double-equal instead of triple equal has its uses. (sometimes one has to ignore the JSHint robot)
cf. commit SHA-1: 310604d4177775257779e7defb8a6eead8c85d3c

- typo fixes

- updated all demos to be entirely HTML compliant entirely, i.e. adding <script> tags around the code in there. This helps both smart editors (color coding) and content validation. The code extractor (index.js) has been adjusted to cope with this. (JS, CSS and JSON data sections now all get their outer script/style tag stripped)
cf. commit SHA-1: 310604d4177775257779e7defb8a6eead8c85d3c

- the editor examples never got changed to the \<!--CODE--> approach; they have now.

Note: on second thought, this action is moot as these demos are (a) not accessible from the demo index page and (b) there simply is no `w2editor` component and I don't think there needs to be as everyone has their favorites already (CodeMirror / CKEditor / ...?). This was done in the heat of the moment when I went through the entire demo directory tree checking each file and adjusting them to have proper \<script>...\</script> sections (see previous extract commit).

So maybe these demos should simply be deleted?
whitespace police
cf. commit SHA-1: 310604d4177775257779e7defb8a6eead8c85d3c

- introduced the `w2utils.deepCopy` API to perform a w2ui-savvy deep object clone: as it says on the package, this performs a deep clone which both keeps parent/child relations intact by keeping the `parent` members true references (instead of pointers to clones as when using `$.extend(true, ...)` which broke several components' demos) and which bugs out with an exception when it detects a cyclic reference in the object tree being cloned.

- all `$.extend(true, ...)` invocations have been replaced with a `w2utils.deepCopy` call.

- added a documentation page for the new `deepCopy` API
forgot add the new deepCopy API doc file
forms-3 example rendered incorrect in Chrome at least; CSS has been tweaked to position the right side panel's labels with their input fields again.
comment to explain why onComplete instead of onOpen (could've used onAfterOpen as well I suppose) here; this has got me confused as to 'why' for a while when I started using w2ui so may help hint another in the right direction too.
the demos might work nicely on w2ui.com but when running them on another server you always want to see them execute against the local codebase (particularly when you're editing w2ui itself ;-) )
document directory structure of the repository
typo fix which I missed in a previous extract
JS coding practices / JSCS lint check: code obj.field instead of obj['field']
observed some very odd use of an otherwise unknown this._tmp attribute which simply acts as local var; given the way it is coded it does not assist as a semi-global in the recursive method, so it can be simply replaced by a local variable. Searched the entire codebase and it does not surface anywhere else but in these places.
fixed crash in sidebar due to code expecting nodes[] to be initialized while it isn't yet (compilers would say: trying to use variable before its assignment/initialization); also simplified the rest of the node tree code as the demos b0rked in a few places in there.

Coding practice: when a node is checked to exist, we perform the simple and fast check `node == null` rather than the more elaborate `typeof node === 'undefined'|| node === null`: there is a use for double-equal after all :-)

We also do not care whether the node caption is set to null, undefined or is really not an attribute of the node: in all these cases there is no usable caption to speak of. Hence once again double-equal to the rescue: `.caption == null`
Again, we don't care whether the `url` attribute is actually part of the instance options and null or undefined: when it is is either null or undefined it is unusable and for all intents and purposes 'not specified': another case of double-equal.