Fixes issues integrating with other libraries that extend Object.prototy...

These fixes use 'hasOwnProperty' checks in the remaining for...in loops in the codebase that don't have them.
This is both necessary when integrating with libraries that extend Object.prototype and is also now considered best practice as enforced by JSLint/JSHint.