Consolidate read functions for text files
repod.files.pkginfo.read_pkginfo and repod.files.buildinfo.read_buildinfo share the same code and need to be unified in a common function for reading plaintext files, so that they may be reused throughout the code (code sharing can probably even happen between them and the respective mtree functionality).
Some valuable feedback for improvement can be found in !46 (diffs, comment 67680) and !46 (diffs, comment 67687).