[git tests] Support log output verification for Git older than 1.7.2

Gits older than 1.7.2 don't know %B.
However, for some reason Git output is different for %s%b and %B:
the latter contains a new line between "fix #1" and "cherry-picked...",
while the first doesn't.
Let's skip space checking for these older Gits.
NPE fix
SQL quoted identifiers handling reworked & IDEA-103850