TST: cluster: some cleanups in test_hierarchy.py

Use Nose's tests generator to merge some tests to reduce the file size and make it clearer.
Some tests are added. The test coverage of `cluster.hierarchy` increases from 51% to 72%.