Check x,y before isPointInPath/Stroke().

Latest version of Firefox has ctx.isPointInStroke() but chokes on undefined x,y
when _detectEvent() is called for the intial draw. Moved check outside to save
unnecessary isPointIn* calls.