Add some helpers to AddRefed.
Merge branch 'master' into atomic-ref