refactor($ionicLoading,$ionicPopup): factor out common code, add tests

- Added $ionicTemplateLoader.compile, which is able to compile a templateUrl or template, with optional controller and parent element, and returns a promise.  That promise is resolved once the compilation/template fetching is done, and gives back an object with an element property and scope property.
- Added $ionicBackdrop service, which has a retain() method and a release() method.  If two different services call $ionicBackdrop.retain(), it will show the one backdrop element until both call $ionicBackdrop.release().
- Added TestUtil.unwrapPromise, which will call then on a promise, $scope.$apply(), and return the result of then.

- Refactored loading, added deprecated $log.warns for old methods. Closes issues: #699, #391, #756, #658, #878, #960
- Refactored popup using $ionicTemplateLoader and $ionicBackdrop, simplifies code and adds unit test suite.  Popup API could still use visitation (#856), but is same for now.

Next steps:

- Add $ionicToast service (#994)
- Use $ionicTemplateLoader and $ionicBackdrop in Modal and Action Sheet