Dellocate memory after jni methods.
Merge pull request #19 from LightUpInc/fix-memory-leak

Dellocate memory after jni methods.
Update callback params and add visualization modes.
Merge pull request #21 from LightUpInc/add-visualization-modes

Update callback params and add visualization modes.
Merge branch 'master' into small-optimizations
Define the thresholding kernel size at the top.