An Inexact Halpern Iteration with Application to Distributionally Robust Optimization