AngularJS: Genericised angular.copy and added JSDoc

Also created test based on documentation: https://docs.angularjs.org/api/ng/function/angular.copy