appc/spec: various updates

- Add version/name/arch to metadata service explanation
- Remote obsolete metadata rationale
- Remove versions (e.g. "-1.0.0") from names
- Fix a few formatting issues (prefer line-per-sentence)
stage1: fix bad path reference :-(
cas: write download progress to stdout

Using mitchellh/ioprogress, implements a visual for the process of
downloading an aci.

Fixes #208.
appc/spec: Collapse app and fileset manifests

This reworks the app image and fileset concepts to collapse them into a
single manifest, the App Image Manifest. The execution details are now
optional. It also describes a dependency retrieval/matching process
based on labels.
appc/spec: path_whitelist -> pathWhitelist
appc/spec: "app" -> "manifest"
appc/spec: minor cleanup
*: numerous updates to match spec

Changes to schema:
- removing FilesetManifest
- update example manifest to match that in spec
- splitting out App into a dedicated type embedded in AppImageManifest

Changes to tools:
- update aci writer (no more filesets)
- update actool build (no more filesets)
- update actool validate (no more filesets)
- update ace validator to use new types
- update rocket stage0/stage1 to new schema
- update ace app manifests to new spec
- fix a bug in build_aci (double compressing aci)
*: AppImageManifest -> ImageManifest
appc/ace: update name in validator
appc: fix relative paths in app validator

strings.TrimPrefix was not correct since it resulted in different
behaviour depending on whether the directory passed had a trailing slash
or not (this meant for example that `actool validate foo/` would succeed
but `actool validate foo` would fail)
Go has a function for the correct behaviour in filepath.Rel, so use it.

Also small style updates to keep up with the recent
appmanifest+filesetmanifest --> ImageManifest change
The tar Header.Name (for example with gnu tar) can start with ./ (for example ./app and
./rootfs/).
Use filepath.Clean and use the cleaned up name. This also makes the logic similar to
ValidateLayout().
Better gitignore rule for vim tmp files.

- Old rule didn't work for top level dir
- New rule includes not-first vim tmp files

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
*: move spec to new home

The appc spec has moved! Its new home is at https://github.com/appc/spec

This removes the spec (since it has already been migrated), and adds
placeholders linking to the new repo. It also updates rocket to
reference the spec repo _directly_ (i.e. NOT godepped). This means that
people will need to maintain the spec in their gopath for now when
building rocket.
pkg: remove unused tarheader package

This was used by actool which is now no longer in this repo
godeps: remove appc godeps, no longer used
travis: add appc/spec repo
*: update contact info in CONTRIBUTING
Documentation: Fix image manifest in getting started guide

The "app manifest" is now called "image manifest" and its structure has
changed. Fix that up.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
rkt run: acquire lock on container directory

stage0 acquires an exclusive advisory lock on the container directory,
leaving the fd open when executing stage1/init with the fd value stored in
the environment variable RKT_LOCK_FD.

stage1's fakesdboot.so shim prevents closure of RKT_LOCK_FD in nspawn by
replacing the close with a O_CLOEXEC fcntl, retaining the lock handle until
nspawn exits.

This facilitates simple and reliable container discovery by external
processes via flock() attempts on container directories.  Consult the
flock(2) and flock(1) man pages for information on advisory file locks.

With this change some basic lifecycle features are trivial using bash:

 Identifying which containers are active:
  shopt -s nullglob
  for c in /var/lib/rkt/containers/*; do
   flock --exclusive --nonblock "$c" echo "$c inactive" || echo "$c active"
  done

 GC of inactive containers:
  shopt -s nullglob
  mkdir -p /var/lib/rkt/gc
  for c in /var/lib/rkt/containers/*; do
   [ -e "$c/stage1" ] || continue
   flock --exclusive --nonblock "$c" mv "$c" /var/lib/rkt/gc
  done

 Assuming a periodic task clears out aged contents from /var/lib/rkt/gc