The points to polygon distance is implemented in C in /speedups/geoutilsmodule.c
I would welcome a volunteer C programmer to implement the needed function with early termination ;-)