Cleanups to reactive logging code for R CMD check

* Fix 'env' partial argument match for get().
* Fix unbound variable access of .shiny__stdout.
* Restructure if statement so test is only done once.
Merge pull request #218 from wch/fix-log

Cleanups to reactive logging code for R CMD check