Refactor: cts: Condense $PATH code into a single function
Each tool was doing the same thing, just checking for a different
executable before deciding how to set the path. It really doesn't
matter which executable we search for, though - as long as we can tell
if we're in the source directory or not. It also doesn't matter if we
add the directory for every single daemon or not, so just do it to make
the code simpler.
This also fixes a bug: sys.path[0] is going to be a directory
containing python source code. It's likely to be python/ under the
source tree, given how we set up paths at the top of each of these
files. TEST_DIR/cts-attrd.in therefore is not going to exist (it'll be
something like ~/src/pacemaker/python/cts-attrd.in) which means we will
never use the source directory for these tests.
Ref T970