Update tutorial code to run in REPL
Streamlined tf-by-doc. Cleaned up other cruft.
Update to reflect latest changes in tfidf sample app. Update to make code snippets runnable from a REPL.