The agreement marks an abrupt twist to an eight-month takeover battle for Time Warner Cable waged by Charter Communications Inc. and its biggest shareholder, Liberty Media Corp., whose chairman is cable pioneer John Malone.