Added `extend` for creating derivations of objects

Extending objects means creating a new object instance, where
the prototype is set to be the base, and the returned
instance has the properties of any additional objects passed.

If there are multiple objects passed, their properties will
be merged with any conflicts resolved by picking the
rightmost candidate.