Fix array diff when removing elements.

Signed-off-by: François de Metz <francois@stormz.me>
Add round-trip tests against the official test suite.

Signed-off-by: François de Metz <francois@stormz.me>