Multi-Agent Cooperation via Unsupervised Learning of Joint Intentions