Photon bunching and anti-bunching with two dipole-coupled atoms in an optical cavity