Update Resource.php

Changed type hinting from concrete class Doctrine\Common\Collections\ArrayCollection to interface Doctrine\Common\Collections\Collection because of problems when using API locally.