lavc: Prettify printing of codec tags containing non alphanumeric characters

Make av_get_codec_tag_string() show codec tag string characters in a more
intelligible ways. For example the ascii char "@" is used as a number, so
should be displayed like "[64]" rather than as a printable character.

Apart alphanumeric chars, only the characters ' ' and '.' are used
literally in codec tags, all the other characters represent numbers.

This also avoids relying on locale-dependent character class functions.

Signed-off-by: Martin Storsjö <martin@martin.st>