Change mergeObject to have option to keep references

Addressing https://github.com/n1k0/casperjs/issues/658. This follows @n1k0's recommendation to add the a reference to keep the references (here it is `keepReferences`).