It's a christmas miracle! ... an efficient circle-polygon collision test! - this also gives you the closest point on the polygon!
Note that this only work for convex polygons but if you want it to work for concave polygons, all you need to do is swap out the PtInConvexPoly test for the PtInPolyTest