A time-optimal solution to planar point location in ordered functional domains, with applications