Fix concurrent install of local harts
Fix concurrent install of local harts

Previously, concurrent `hab pkg install`s of local packages could
result in one or both of the installs failing. This was because both
hab processes would directly copy the hart into the cache. If one
process unpacked the hart when the other process was still writing it,
it would fail.

We fix it here by using AtomicWriter to ensure that we never put an
incomplete file into the cache.

This also prevents other kinds of cache corruption, such as if you
were to kill a hab process in the middle of copying. An alternative
approach might be some sort of lock if we would prefer to avoid the
extra IO completely.

It might be a bit tricky to write a automated test for this cases, but
I've tested this locally with the following test script:

```
HAB=$1

$HAB pkg install ./core-erlang-20.0-20190115223057-x86_64-linux.hart &
sleep 1
$HAB pkg install ./core-erlang-20.0-20190115223057-x86_64-linux.hart

rm -rf /hab/pkgs/core/erlang/20.0/20190115223057
rm -rf /hab/cache/artifacts/core-erlang-20.0-20190115223057-x86_64-linux.hart
```

Using hab 0.74.0 one process fails, one succeeds:

```
> sudo ./test.sh hab
[1] 29243
» Installing ./core-erlang-20.0-20190115223057-x86_64-linux.hart
» Installing ./core-erlang-20.0-20190115223057-x86_64-linux.hart
✗✗✗
✗✗✗ Couldn't read MetaFile: IDENT, not found
✗✗✗
[ ... SNIP ... ]
★ Install of core/erlang/20.0/20190115223057 complete with 1 new packages installed.
```

Using hab from this branch

```
sudo LD_LIBRARY_PATH=/hab/pkgs/core/zeromq/4.2.5/20190117202641/lib:/hab/pkgs/core/openssl/1.0.2q/20190115014220/lib/ ./test.sh target/debug/hab
» Installing ./core-erlang-20.0-20190115223057-x86_64-linux.hart
» Installing ./core-erlang-20.0-20190115223057-x86_64-linux.hart
[... SNIP ...]
✓ Installed core/erlang/20.0/20190115223057
★ Install of core/erlang/20.0/20190115223057 complete with 1 new packages installed.
✓ Installed core/erlang/20.0/20190115223057
★ Install of core/erlang/20.0/20190115223057 complete with 1 new packages installed.
```

Fixes #5616

Signed-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io>

habitat-sh/habitat,habitat-sh/habitat,habitat-sh/habitat,rsertelon/habitat,rsertelon/habitat,habitat-sh/habitat,habitat-sh/habitat,rsertelon/habitat,habitat-sh/habitat,rsertelon/habitat,rsertelon/habitat,habitat-sh/habitat,habitat-sh/habitat,rsertelon/habitat,rsertelon/habitat