Simplified decode_chunks

Now initializes the chunk list on its own
Simplified combine_image_data

Now initialises the binary on its own
Moved code around to separate public API, encoder and decoder