Resource promise

Added promise properties $q and $resolved to resource object.  

I put in some unit tests to make sure the properties are behaving as expected for get, query, save and delete operations.