Fix a couple of cases where WildcardUnix was not matching when the
string was just [] or ended with a \.
The testWildcardEscaping() test has been extended to account for these
two cases too.
Integrate 7ce3726aea4be2dfdb57966a4482f66fec6f8f57 from 4.8
Task-number: QTBUG-20897
Change-Id: I7a07ac008473fa7a080db752e189f6404842603f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>