PROTON-176: Fixes to Perl code due to unit test failures.

Fixes for code that failed the new unit tests.
PROTON-176: Provide Perl unit tests.
PROTON-176: config.sh now modifies PERL5LIB for developers.

The build directory as well as the Perl bindings path are now added to
PERL5LIB to allow in-place running of the Perl code.