Don't consider workspace corrupt if multiple lines returned from rev-parse

On Windows, rev-parse will occasionally result in two lines of output - the expected SHA1 hash followed by a "The process has leaked file descriptors" message. This is not a problem in the Git repo - it is NOT corrupt - but instead a process-handling problem.

This patch changes the polling process so that it does not fail if multiple lines are returned. Instead, it logs the extra lines but returns the first line, expecting it to hold the SHA1 hash. If the repo is truly corrupt, a failure will occur later on when trying to interpret the first line text as a hash value.

This addresses Jenkins-11547.