unwrap() util which alleviates the deprecation of promise unwrapping in AngularJS v1.2