The dynamics and stability of circumbinary orbits