Fixed deadlock in -collectDirtyChildren:
Fixed deadlock in -collectDirtyChildren:

By no longer holding a lock while recursing, we allow other threads who may be waiting on the current object to progress before iterating to children of the object, solving some of the deadlocks that we've seen in issues #11, #61, and #299.

This does not necessarily fix the above issues, as we probably still have similar deadlocks elsewhere in the codebase.

cc @grantland

gavinbunney/Parse-SDK-iOS-OSX,Jericho25/Parse-SDK-iOS-OSX,manuyavuz/Parse-SDK-iOS-OSX,gavinbunney/Parse-SDK-iOS-OSX,podkovyrin/Parse-SDK-iOS-OSX,nagatak/Parse-SDK-iOS-OSX,Jericho25/Parse-SDK-iOS-OSX,dvanwinkle/Parse-SDK-iOS-OSX,Jericho25/Parse-SDK-iOS-OSX,gavinbunney/Parse-SDK-iOS-OSX,manuyavuz/Parse-SDK-iOS-OSX,dvanwinkle/Parse-SDK-iOS-OSX,gonzalonunez/Parse-SDK-iOS-OSX,gonzalonunez/Parse-SDK-iOS-OSX,ParsePlatform/Parse-SDK-iOS-OSX,JeckoHeroOrg/Parse-SDK-iOS-OSX,natanrolnik/Parse-SDK-iOS-OSX,MetaStackers/Parse-SDK-iOS-OSX,ParsePlatform/Parse-SDK-iOS-OSX,JeckoHeroOrg/Parse-SDK-iOS-OSX,nagatak/Parse-SDK-iOS-OSX,nagatak/Parse-SDK-iOS-OSX,MetaStackers/Parse-SDK-iOS-OSX,MetaStackers/Parse-SDK-iOS-OSX,manuyavuz/Parse-SDK-iOS-OSX,JeckoHeroOrg/Parse-SDK-iOS-OSX,natanrolnik/Parse-SDK-iOS-OSX,podkovyrin/Parse-SDK-iOS-OSX