Angular resource factory to track CRUD states