[MAJOR] struct chunk rework

Add size to struct chunk and simplify the code as there is
no longer required to pass sizeof in chunk_printf().
9 files changed