Updating code using new idea: there should only be a hybrid mode for accsessing global functions, but this mode should be ephemeral. For use with deployr, deployr should be part of a deployable project. Then to run the process in production it would be:

'pacman::on(), deployr::run_main()'

A lot cleaner I think.
My minor proposed changes to Guy's awesome version:

- Default "." for `on` restored. Not totally sure if this was removed intentionally, if so I suspect it has to do with the change-working-directory-on-switching feature - see below.
- I am not sure how I feel about changing working directory automatically when switching mode. I fear it would turn out to cause more confusion than benefit, so I commented it out for now.
- After playing around with `globalise`, I realised that it basically allows you to evaluate any given expression in "hybrid" (now renamed "expanded") mode. I think this could be a useful feature to have access to in `off` mode as well - e.g. it would allow us to write `run_main` in such a way that `deployr` doesn't have to be installed  locally, although that's maybe a bad idea. It also allows to `globalise` things other than functions (environments, classes, etc). Overall I am not sure how useful this would wind up being, so I simply separated the part of `globalise` that does that in an unexported function `expanded_mode`. `globalise` works exactly as before.