started generalization of mood's test to n-d case, created function mood_nd
add function mood_nd and tests for it