Squashed commit of the following:

commit 70d9ea82e38726ccbc11e19fce2f11b50902e12f
Author: Mangala Sadhu Sangeet Singh Khalsa <mangala@khalsa.com>
Date:   Tue Feb 4 12:21:36 2014 -0700

    Fix potential stack overflow in dojox/gfx/path#_updateWithSegment

    https://bugs.dojotoolkit.org/ticket/17715

SitePen CCLA

(cherry picked from commit 67486ca03ed13a8827171c4dba0f5f77d0bd6f4c)