cleaned up implementation of latches in MOAITask and MOAIHttpTaskBase