firebase/angularfire — pull request #488 by jamestalmage (2014-11-29 00:28:01+00:00)
Title: utils: add makeNodeResolver function.

Many Firebase methods take Node.js style callbacks where the first
argument is null do indicate success or contains error information.
Angular uses promises to handle asyncronous flow. The original
[Q](https://github.com/kriskowal/q) library by kriskowal (upon which Angular promises are based)
had a `makeNodeResolver` function that eased integration of the two
different async flows.

This utility function replicates that feature. Usage is as follows:

```javascript
var defer = $q.defer();
ref.resetPassword(
{email:'somebody@somewhere.com'},
$util.makeNodeResolver(defer) //automatically resolves/rejects promise
);

defer.promise.then(...) // use the promise as you normally would
```