Fix corner case in "up to date" check.

Currently, the timestamps of target artifacts (and only these) are
always retrieved from disk before checking whether artifacts are up to
date. This can lead to problems, for instance in the following scenario:
    - The transformer creating the target artifact has another output
artifact, i.e. the target artifact has a non-target sibling.
    - The sibling is created in a different command that runs after the
one creating the target artifact.
    - While the command creating the target artifact is in progress, a
different, unrelated command running at the same time fails.
As a result, the executor will wait until the in-flight commands have
finished and then cancel the build, not running any commands still
queued for execution. This means that the target artifact will have a
different on-disk timestamps than its sibling.
On the next build, this newer timestamp will be retrieved. Since the
current code assumes that all sibling artifacts have the same timestamp,
it only checks one random output artifact. If that happens to be the
target artifact, the up-to-date check will report that the transformer
does not need to be re-run, even though one artifact is not up to date.
This patch fixes the two closely related subtle bugs that can lead to
this behavior:
    1) Get rid of the "convenvience functionality" that always checks
the timestamp of target artifacts as a service to users that do not know
that they are not supposed to manually touch files in the build
directory. This behavior has been obsolete since the introduction of the
"--check-timestamps" option.
    2) If the "--check-timestamps" option has been given, our invariant
about all output artifacts of a transformer having the same timestamp is
not guaranteed to hold, as they come from an outside source. Therefore,
in this case we must check the timestamps of all output artifacts, not
just one.

Change-Id: I482fe6060c0dee5fef74a9236a787dc7d40f3b24
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Do not leak exceptions from the Profile class.

This is public API.

Change-Id: I37cfd018e350a3ff4cecba34af42bf23a8aaf0fd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix profile test.

We don't throw exceptions anymore.

Change-Id: I4a8baba0b3fd0d6af7adceb4c6ef905f63b84efd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Tighten sanity check.

Check for the same file appearing as different artifacts in a child
list. See QBS-491 for an example.

Change-Id: Ie93268c05386ccfae2a57097a19e5ec7d135902a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Merge remote-tracking branch 'origin/1.1'

Change-Id: I7319a1deea008c9f4df077eaecf3147872fc4a21