Build script improvements and more debugging for remote connections.

build_universal_lib.sh now takes a parameter, if it is Debug, a debug static library gets built otherwise a release static library is created.

run_test.sh now sets the TEST_AFTER_BUILD flag to YES which means it can be set to NO permanently for developers.

The HTTP status code is now output if logging is set to Trace and any connection errors are now logged.