add check for auto-detection of new variables to init lesson process

@WilCrofter Do you agree that we should only add variables created from initLesson.R to `e$snapshot` if `AUTO_DETECT_NEWVAR` is `TRUE`? 

initLesson.R gets sourced every time a lesson is started or resumed, so it seems unnecessary in most cases to save any variables created to the "official record". Right now, for example, if a dataset is created for the user in initLesson.R, the entire thing gets saved via `saveRDS()` after every unit of instruction, which can be rather cumbersome.

Note that I'm using `isTRUE()`, which returns `FALSE` in the case where `customTests$AUTO_DETECT_NEWVAR` is `NULL` because it hasn't been defined yet.