move chapter data writing to a helper function
move chapter data writing to a helper function

neuschaefer/libgpod,neuschaefer/libgpod,hyperair/libgpod,neuschaefer/libgpod,hyperair/libgpod,hyperair/libgpod,hyperair/libgpod,hyperair/libgpod,neuschaefer/libgpod,neuschaefer/libgpod