Fix for potential security issue.
Shutdown function not anonymous function, but regular function `shutdown_function()` now to allow to cancel its execution.
Switch from CSTester to PHPT tests.
Added tests for distributive building and installing.