[cmake] Add an override option for tmpdirprefix when running functional tests
Summary: This make it possible to use a ramdisk as storage for running the functional tests, which can bring a nice speedup on some tests.
Test Plan:
mkdir /dev/shm/abc cmake -GNinja .. -DFUNCTIONAL_TESTS_TMPDIRPREFIX=/dev/shm/abc ninja check-functional
On my fast ssd machine (so worst case), duration is lowered from 62s to 49s.
On some dev VM with network drive, duration is lowered from 218s to 178s.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17965