Pointwise ergodic theorems via descriptive set theory