Changed input NDArray to pass by value for AJD class and fixed a memory leak in ICA unit tests and examples