lib,test: correct handling of multiple servers

Modified the API so that installSessionHandler() takes an optional
namespace parameter that can be used to distingiush between multiple
servers.

The namespace is used as a prefix for NativeStore keys.