Matroska demux improvements

by Jai for VideoLAN

This task entails fixing problems with the current mkv demux functionality (lavf wrapper/native code) and adding some enhancements.