Dependent builds (aka artifacts passing)

I want to finally solve this: https://gitlab.com/gitlab-org/gitlab-ce/issues/3423

My idea:

build:
  stage: build
  script: ...
  artifacts:
    paths:
    - binaries/

test:
  stage: test
  script: ...
  dependencies:
  - build

deploy:
  stage: deploy
  script: ...
  dependencies:
  - build

It will download all dependencies from the build in test and deploy jobs. I thought about putting that in context of artifacts, but this makes it confusing what artifacts are doing: part of the options will be used for creating an archive, and part for selecting dependencies. Using the dependencies seems like a simple and clear solution.

By default the build will depend on all past builds.

cc @grzesiek