NETEGRITY, INC. PREFERRED STOCK AND WARRANT PURCHASE AGREEMENT January 6, 1998