Always use debugging options in CMake build
Fix compile error looking for MAXPATHLEN
Disable copy-on-write by making all array functions always copy

Currently has issues
Remove more instances of hasMultipleRefs
Remove usages of hasExactlyOneRef

Currently untested
Fix failing array_plus_eq test
Fix curl_copy_handle tests.

I'm not really sure how they were passing in the first place, and
what I did to make them fail.
Allow arrays to not be copied when adding a new key.

Fixes failing serialisation tests
Fix invalid array copy sometimes breaking array_multisort