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 59% to 72%.