Code cleanup and de-"clever"ification for mustache_helper.js

* fixed indentation
* consistent spacing "if (", ") {", "function ("
* explicit return statements, esp. for "!f()" at the end of a function
* a && b -> if (a) b

Also simplified and separated the "firstexist" and "firstnonempty" helpers from a can.each loop, so IDEs could pick up their definitions.

Commented several helpers.

Only style, no functional changes.
Can you move declarations of i, v to the top of the function? It's because for statements don't really have their own scope in js which means that even though they were defined within a for loop, they will still be available outside it.

Alternatively, change `var` with `let` and make sure all the browsers implement ES6 asap :smiley: