Refactoring of packrat_mode + better package mutables

- Refactor packrat_mode into packrat_on and packrat_off
- Use knitr-style closures for 'package' variables that can be
  get and set by the user (this is for storing the project path)