CLN/BUG: Better validation of levels/labels/names

Improved validation of levels, labels and names (plus fleshed out test
cases). Fixes #4794.

Changed an assert_almost_equal to assert_series_equal to better reflect
actual return value.