Split types.go into several files
Created by: eseliger
Review commit-by-commit. It basically reorganizes the huge file into several smaller ones. I initially also wanted to add tests, since the coverage is quite low, but turns out thats not correct, the coverage is just not captured because it's covered across package borders. Turns out what I would have tested already is, and the main untested parts are some events and the metadata update logic, I feel like adding tests here would just be for the sake of completeness, though, so unless you veto, I would leave that work for maybe later, if we feel like doing it then.
Closes #13174 (closed)