Set trqauthd to connect to all valid addresses/protocols

Modifies trq_simple_connect() so it tries all entries returned by
getaddrinfo() instead of giving up if the connection fails. For example,
given an /etc/hosts of:
127.0.0.1 localhost
::1       localhost

trqauthd will now try both the IPv6 and IPv4 addresses.
off-by-one allocation caused trqauthd segfault
Added a timeout on the net_cache test.
Fixed a number of build errors.
Fixed coverity issues: CID 1063157 & CID 1063156.
Merge branch 'master' of https://github.com/adaptivecomputing/torque
Fixed compiling error.
trq-1536 Sort nodes while adding them into the linked list.
trq-2152 reallocated a freed pointer to prevent a double free.
Merge pull request #162 from jbarber/master

Set trqauthd to connect to all valid addresses/protocols
Fix a problem with the unit test for trq_auth.c
Fixed a problem where trqauthd would cause segfault on exiting
and also would not load if pbs_server were not running.

Updated unit tests.

TRQ-1247
Merge branch 'master' of https://github.com/adaptivecomputing/torque
Fix a coverity bug introduced by the pull request I merged in.
Merge branch 'master' of https://github.com/adaptivecomputing/torque
fixed bugs in unit tests for Libifl trq_auth
Made it so unit test for net_cache would run faster
Fix logic for parsing port number out of string.  New logic is:
 1. If the string starts with a colon, it must be port number only.
 2. If the string consists ENTIRELY of digits, and it converts to a
    valid TCP/UDP port number, assume it's only a port number.
 3. Otherwise, parse it as a hostname with a possible ":port" suffix.
Removed duplicate free of socket variable new_conn_port from
start_domainsocket_listener because the variable is already
freed in process_svr_conn. TRQ-1247.
Resolve a merge conflict when cherry picking the fix for TRQ-2155.
TRQ-2058. Add the ability for pbs_mom to parse a mom hierarchy file instead of having to receive it from pbs_server. For large systems, this is a good optimization because currently the hierarchy is sent out to all moms from pbs_server, which can create a large amount of network traffic at start up. This is done even if there's no mom hierarchy so that the moms know the addresses of all other moms. Also, add the option to have pbs_server only send out the hierarchy on request (-n)