Handle the case of unloaded original file (see #10347)
Review test for #10347
cleaning
Add an extra test.
Add extra test using pojo object.
Add extra test checking if original is loaded.

Check that the original file is loaded when
the exclude close is on.
remove  null check.
Forgot to save all changes.
Add input check and initalize arry in toJavaList() and toMatlabList()

Add unit tests for Java-Matlab array conversions
Refactor toMatrix() and allow to convert stacks into matrices
Add unit tests for toMatrix() helper function
Remove deprecated function
Fix loadOmero() unit test
Add optional argument for casting function in toJavaList()

- Add corresponding tests in TestToJavaList
- Implement input parsers to validate input
Move helper functions to src/ directory
Use inputParser in toMatrix() function
Move unit tests to test/unit folder
Delete deprecated demo/test functions
Remove deprecated helper functions
Remove references to gateway from loadOmero()