Copy prototype bug with enumerable properties

Per [this thread](https://github.com/angular/angular.js/commit/b59b04f98a0b59eead53f6a53391ce1bbcbe9b57#commitcomment-6844633)

Creating a placeholder for a possible fix which includes associated tests.
You should not remove `hasOwnProperty` otherwise it will copy properties from prototype chain. I have replaced `for...in` and `source.hasOwnProperty` with `Object.getOwnPropertyNames(source)` to include non-enumerable properties in PR #8034 but I am not sure if this is what you want.