.gitignore: ignore tarballs
Add jshint as "pretest"

Add .jshintignore so that "jshint ." checks only the relevant files.

Add "jshint ." as "pretest" script.

Fix issues discovered.
Prevent couchapp messages from polluting stdout

Add a temporary redirect of console.log to the debug log.