Spaces of pseudo-Riemannian geodesics and pseudo-Euclidean billiards