fix the bug that $rootScope is not accessed outside angular

 - $rootScope.$apply() must wrap the code that access $rootScope
   variables in the outside angular world
Ignore certificate verification for SSL with backend server

 * oauth2-restapi-server has self signed certificate for SSL test.
   this certificate is rejected by security policy of iOS Platform as default.
   iOS platform only allow certificates issued by public CA like VeriSign.
   So, this as iOS app needs to ignore cert verification for oauth2-restapi-server.
   For this, I implement specific delegate function regarding cert check.

   <reference>
   * http://www.cocoanetics.com/2009/11/ignoring-certificate-errors-on-nsurlrequest/
Merge branch 'master' of github.com:vinebrancho/cordova-angular-frontend-sample