Bug 965082 - Unify duplicate bits of state of proxies. r=mrbkap,r=gabor

Conceptually, these all boil down to "is this a security wrapper?"
Bug 965082 - Only run the {get,set}PrototypeOf override for non-SecurityWrappers. r=mrbkap,r=gabor
Bug 965082 - Tests. r=mrbkap,r=gabor