.ase format: write the header at the beginning of the process

This is a common issue when the save process fails, we get an .ase file
without header. So basically with this change we save the most important
information of the header first, and then save the rest of frames/layers
info. At the end we can save the file size.

- Other change: removed "current_frame_header" static variable.
.ase format: remove static members to save chunks