added interface for mem_cmp
implementation and test for mem_cmp
follow maintainers' comments
Merge pull request #475 from UnixJunkie/batlist_mem_cmp

BatList.mem_cmp