feat(ngResource): make stripping of trailing slashes configurable for `$resource`

By default, trailing slashes will be stripped from the calculated URLs, which can pose problems with server backends that do not expect that behavior. This patch aims to make this behavior configurable via:

```javascript
app.config(function($resourceProvider) {
  $resourceProvider.defaults.stripTrailingSlashes = false;
});
```

or per instance, using a new, fourth, optional argument to the `$resource()` constructor:

```javascript
var CreditCard = $resource('/some/:url/', ..., ..., {
    stripTrailingSlashes: false
});
```

This is targeted to be a fix for #992. Please let me know if anything is missing from this, or you need me to change anything to make the implementation more idiomatic.

---

PS: I'm sorry for the seemingly large patch, but most of it is just indentation (due to rewriting the factory as a provider). I've tried to isolate the whitespace change in a separate commit.