Capture inputs of tasks before execution
Capture inputs of tasks before execution

It is possible that during execution the build script changes inputs
via `doFirst` on a task. We want to capture the inputs before we start
the execution since the key for the task output cache is also caculated
before we start execution.

+review REVIEW-6372

blindpirate/gradle,blindpirate/gradle,robinverduijn/gradle,lsmaira/gradle,gradle/gradle,lsmaira/gradle,blindpirate/gradle,lsmaira/gradle,lsmaira/gradle,robinverduijn/gradle,gstevey/gradle,gstevey/gradle,gstevey/gradle,gradle/gradle,gradle/gradle,robinverduijn/gradle,blindpirate/gradle,robinverduijn/gradle,blindpirate/gradle,robinverduijn/gradle,robinverduijn/gradle,gstevey/gradle,gstevey/gradle,blindpirate/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,gradle/gradle,robinverduijn/gradle,lsmaira/gradle,gradle/gradle,lsmaira/gradle,gstevey/gradle,gradle/gradle,robinverduijn/gradle,lsmaira/gradle,blindpirate/gradle,lsmaira/gradle,blindpirate/gradle,gradle/gradle,lsmaira/gradle,gstevey/gradle,gradle/gradle,blindpirate/gradle,lsmaira/gradle,gstevey/gradle,gradle/gradle,robinverduijn/gradle,robinverduijn/gradle,gstevey/gradle