Jpeg2k Decode/Encode Memory Leak Fix

From @joshware  -- Fixes #870.

Promotes decoder->cleanup to a run every time function, not just on truncated images. 
Adds encoder->cleanup as well.