Treemachine compatibility

Merging duplicate GeneralUtils class and bringing in general-use exceptions classes that were previously in the treemachine repo. This has been tested against the updated treemachine using the asterales example in gcmdr and works.

This pull request introduces changes that the treemachine pull request https://github.com/OpenTreeOfLife/treemachine/compare/ot-base_update?expand=1 depends on, and should be merged prior to that one.

@josephwb, will you confirm this (and associated treemachine changes) is working and merge?