environments: replace copy-on-write with safe deepcopy envs.

Unfortunately, Lua makes it difficult to write a general copy-on-
write table, because __index doesn't know whether it was called
as part of resolving the RHS of an assignment. The previous
implementation tried to overcome this by prefilling the COW table
valued entries with a proxy that loaded the required subtables
on-demand, but that doesn't work when on the LHS of a table
valued key lookup (it returns the empty proxy table, rather than
the real table value).  Punt for now with the order of magnitude
slower (but correct!) deep copied environments.
* lib/specl/util.lua (cow): Remove. It doesn't work in common
corner cases.
(deepcopy): Rewrite for full and correct loop-detecting algorithm.
Adjust all callers to use deepcopy() instead of cow().

Signed-off-by: Gary V. Vaughan <gary@gnu.org>