[JENKINS-23365] Noting some nullness conditions; calcRevisionsFromBuild in particular is tricky.
Automatically disable test timeout when running in a debugger.
[JENKINS-23365] Follow-up API fixes: introduce SCM.getKey(), and add an SCMRevisionState baseline argument to checkout.
Necessary in order to produce correct changelogs by SCM plugins which actually use SCMRevisionState correctly (unlike git-plugin!).