added unit tests for the code which enables trqauthd to
 remember the active server. The unit tests also revealed
 some minor bugs in the code that were fixed. TRQ-1478