Bouncing cosmology in modified Gauss–Bonnet gravity