Add better flattened fields implementation
- Add BuilderInterface for all builder classes, moved this from the entities package
- Add flattened fields trait from entities package to use the same logic about type casting here
- Usages of the library should not break in any way, but because flattened fields are now more strict this will be a new "breaking" version