Fix warning about missing base packages on 'opam switch'

We were printing the warning about the wrong switch (ie. the source switch instead of the destination switch).
Fix #618: make 'opam switch' a bit more pipe-friendly

I've split the function to print environment warnings in two: one on post-init commands and one on post-switches command, so it's easier to change them independantly.