mw.loader: Use Object.create() instead of $.extend() where possible
For cases where we want a variation of an object with some keys added
or changed, use native Object.create() to create a plain object that
inherits from the other object (without needing to loop and copy each
key/value separately).
This optimisation only works, of course, if the original object
by-reference does not change later.
Also remove hasOwn filter from sortQuery, because it must now consider
inherited keys as well. This filter was already obsolete given mw.loader
already has many unfiltered for-in loops in other places, and just in
general doesn't support environments that extend Object.prototype.
Change-Id: Ib405e32d4598dfb94629c2596ea0804d1c13e7c0