Deniz Undav hit a second-half hat-trick, including a stoppage-time equaliser, as Stuttgart recovered from going 2-0 down to salvage a point in Dortmund.