bootstrap.sh: fix CC detection

There were three errors in CC detection:

1. The wrong variable was used in the for loop.

2. The selected CC was checked for existence and execute perm,
   but instead of the full path to the executable just the basename
   was passed to test -x.

3. The info log message accidentally printed the value of CC.
bootstrap.sh: fix tar reading from stdin
Merge pull request #1674 from tuncer/fix-bootstrap.sh

Fix bootstrap.sh