Bug 1042319 - [Gallery] Update gallery edit UI r=djf

I'm not convinced that this line is a good idea.  If you have a Date object, then this object will call new Date(), but won't create the same date.  I think I'd restrict this function to cloning just regular objects and just do var copy = {}; here.

Also, it would not surprise me if it was faster to clone an object by calling JSON.parse(JSON.stringify(o));  In fact googling "jsperf clone object" yields this page: http://jsperf.com/deep-cloning-of-objects  It shows that parse/stringify is almost as fast as a much more complicated function (See deepClone1 vs deepClone2).  deepClone2() explicitly handles arrays which yours does not, and is slightly faster on firefox, but appears slower on Chrome.  In any case, I thins JSON stringify/parse would be totally fast enough here, and easier and safer.