Make it work for 8.x hierarchical projects and new-style buildType IDs.

This diff is the one that makes it work for 8.x: https://github.com/walquis/tcjson/compare/cread:ebca970...master.  The rest of the diffs are mostly garbage in IntelliJ project files from a commit awhile back to make it build against 7.1.