Move locking into specific places

All locking happens in the install functions.  Either the prefix or the pkgs
dir is locked.  In particular

| Function     | Lock            |
|--------------+-----------------|
| fetch_pkg    | pkgs            |
| rm_fetched   | pkgs            |
| extract      | pkgs            |
| rm_extracted | pkgs            |
| link         | prefix and pkgs |
| unlink       | prefix          |

Because the lock on the prefix might create the prefix (i.e., in conda
create), the locking mechanism was modified to delete the locked directory if
it is empty when the lock is released.

I haven't yet added any locking to the build command.
Merge branch 'master' of github.com:ContinuumIO/conda