Your problem is in these lines:
ContactManager.reqres.setHandler("contact:entities",function(){
return API.getContactEntities;
});
You need to write API.getContactEntities()
otherwise you're returning a function reference instead of your contacts collection. This causes the undefined error.