avilib: add function for retrieving the total number of audio chunks
AVI reader: fix skipping of 0-sized audio chunks

Fixes #843.
mkvmerge: set I/O priority class to 'idle' for lower/lowest --priorities on Linux

Implements #863.