rewrite ``indexin`` function according to @timholy and using comprehension

rename to indexin

rename to indexin
Merge pull request #3269 from wlbksy/master

Add ``indexin``, which is similar to Matlab's ``ismember``