Refactor how sids are obtained

git-svn-id: https://svn.apache.org/repos/asf/manifoldcf/branches/CONNECTORS-754@1534631 13f79535-47bb-0310-9956-ffa450edef68