update get_parent_location method to select non-orphan parents from mult...

...iple parents

STUD-2007
This will be called in lms and thus must minimize db access. I'd have to look at `get_orphans` to see how expensive it is. My gut is that I'd leave out the `orphans` variable as being too expensive to calculate and change the ancestor walk to terminate at the first record whose category is `course`. That would be `log_n` calls at most. However, it could be that `get_orphans` is or could be made efficient enough (one db access) that it's better than the `log_n` calls. Did you look at it? (Also, @adampalay found a bug in `get_orphans` which reports more things as orphans than is true due to this whole dual parent pointers which you're trying to solve, but I think you're susceptible to that bug here.)