More updates to code_jam.py

- Loading files from the command line now correctly closes the files
- Tokens is no longer an iterator. It is still iterable.
- autosolve now checks the decorated function to see if it is a
  generator or function.