The Lakers and Pistons — two of the NBA’s most clutch teams — delivered a late-game thriller in Detroit.