Fix infinite loop in MavenProjectsTree.findRootProject when there is more than one level of aggregate POMs

Fix with it's unittest.

Could you include this fix in the next IDEA 13.1.x  ?
PS: I already the Contributor Agreement some months ago