Refactor the 'fmt ' tag search and parsing

Moving the search and parsing of the 'fmt ' info the main loop of wav_read_header() allows tags that precede it to be parsed.
Creating wav_parse_fmt_tag() makes wav_read_header() easier to read.
