feat(ngResource): headers passed can be now also a function

When creating a new resource, you can also pass a function as header to be executed when the ajax request is called; this is useful when you have to provide some headers that have to change dinamically.