Resources now managed properly, fixes #3. tfidf rewards now memoize vectors, corpus sim is now parallel.