Fix thread data race in XClib
A couple of fixes (hopefully the last ones) emerged from the last pre-release checks.
An openMP atomic update has been added in XClib for the error variable in the same way as the openacc one.
The error messages have been enabled for the xc derivatives too.
Edited by Ye Luo