Fixes #864

I modified all clone functions to return undefined if the object being cloned is undefined.  
I also searched through the code to remove `if (xxxxx !== 'undefined')` statements wrapped around clone function calls where they were no longer needed, and I updated tests and documentation to reflect the new behavior.