Stop dropping properties in copyObject/copyArray

Previously, if we didn't know about a property type we would just drop it.
This led to various fixes to add support for booleans, nulls, etc. We're
now having problems again, this time with functions not being copied.

So instead of only copying types we know how to copy, deep clone the ones
we know how to and shallow copy the ones we don't know about. This seems
like a saner approach to me. Besides, it doesn't seem like cloning a
function is even possible in JS.

Change-Id: Idd1546ce3a43087a8b96a37101431e466e02f04f
Merge "Stop dropping properties in copyObject/copyArray"