locate service: allow customisation

Fixes #2961

It'd be great if someone could spend 2 mins eyeing this for any obvious mistakes.

I note that `nixos-option` does not show updated values, I don't know what the deal with that is.
Am I wrong, or you are creating /var/cache here instead of /var/cache/locatedb ? That is, why the $(dirname ...) ? It's an old thing, but seems wrong.