Dynamics of massive black hole triplets: promising sources for LISA and pulsar timing