creates asMutable method on Immutable arrays and objects.

accepts a deep flag to force a deep conversion for nested objects. 
Style note: I'd do this as `if (opts && opts.deep)` (and the same below)