Made RefDB APIs a little more consistent, added addIndex and automatic index initialization on forced index on Ref.add