Bain Capital, the private equity firm, was near a deal last night to acquire Applied Systems, a software company that focuses on the insurance industry, for about $675 million, according to people involved in …