Duality and integrability in topological string theory