Free port autodetection, improved source(), test fixes

Hi.

I spun off some changes from my no-embedded branch. Feel free to cherry pick if you don't agree with some changes. I needed autodetecting free server port for running tests in parallel with system-installed MariaDB. Also, I found some Linux machines that can't run the test that depends on /bin/true having --version, and finally I changed the DB.source() function to not use external script.