Check shared memory in outputs
Outputs check that subsequent pushes don't share memory.
Additionally, adds an argument force_copy to to_xarray for end users to guaranteed to get a copy.
This is not a 100% fool-proof solution for the problem. Finally, users are responsible to copy if required. The check will, however, trigger in almost all relevant cases.
On top of !217 (merged) (discussion there).
Fixes #82 (closed).
Performance
Push/pull before:
Push/pull after:
Edited by Martin Lange