MDL-25500 locking: Move the default lock dir out of the $CFG->cachedir

The cachedir gets wiped out when caches are purges, so it is not suitable
for storing lock files.