Linear Project#ancestors

Project#ancestors (aliased to #ancestors_upto) uses ObjectHierarchy to make recursive calls. We can replace this method with a linear version.