Prevent dormant multi branch project continiously building.
JENKINS-63494 and JENKINS-64193
When scanning a multi branch project if the history of changes is outside of the `Head change query limit` then no changes are found. The old behaviour used the latest change and triggered a build; continuously triggering dormant projects with each new submit.
The new behaviour uses the last build change if no changes are found (preventing a triggered build) or if there was no previous builds (in the case of new projects) then the latest changes is used to triggering a build.