The remote-access company put the workplace behind a login screen. Its rise, sale and security crises reveal what happens when the door to the office becomes software.