Generalize is_tree and is_forest to directed graphs.

Also add recognition for branchings and arborescences. I'm preparing another pull request which builds on this code. I was planning to add unit tests in that PR (next week).