Detecting unstable periodic orbits and unstable quasiperiodic orbits in vibro-impact systems