Triggered single photons and entangled photons from a quantum dot microcavity