fix(*): do not rely on an object's hasOwnProperty 

As noted by #1944, AngularJS currently relies in several places on an object's own `.hasOwnProperty()` method. This will break when said object does not inherit from `Object.prototype`, or when this key is redefined.

This patch is inspired by jQuery's approach to the problem.

### Caveats

* No tests for `Object.create(null)` were included, as they would break on old versions of IE; however, their practical effect is the same as redefining `hasOwnProperty` to `undefined`.
* I only included tests for the main functions, as I felt that writing a test for every single instance where `hasOwnProperty` might be called would needlessly dilute the tests.