Fixed functions in pathfinding logic

I found those two inconsistencies while browsing the code. Someone familiar with the PathFinder and ObstacleCheck should have a look if I interpreted those functions correctly.
But it is still different since mStateDuration only makes sense together with mWalkState and gives you i.e.
evade duration = (mWalkState == evade)? mStateDuration : 0

So there are still different times spent in being stuck and evading. The payoff is that updating mStateDuration is cleaner. In the old version if the function was called with 
duration > DURATION_SAME_SPOT
the function never returns true. Therefore in AiPackage::PathTo() mObstacleCheck was commented out.