implements jpeg buffer decoder (progress #35)
implements png buffer decoder (progress #35)

fixes memory leaks with encoder.
changes structure of encoder.
cleans up dependencies
implements open image from buffer. closes #35
Merge pull request #39 from EyalAr/decode_buffer

Decode buffer