TST: Add test for np.take refcounting

Also make the testcase for take a class.